mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Support 'I' inline asm constraint.
llvm-svn: 35129
This commit is contained in:
parent
f756184c5e
commit
2dabb16eac
@ -4523,6 +4523,17 @@ SDOperand X86TargetLowering::
|
||||
isOperandValidForConstraint(SDOperand Op, char Constraint, SelectionDAG &DAG) {
|
||||
switch (Constraint) {
|
||||
default: break;
|
||||
case 'I':
|
||||
if (isa<ConstantSDNode>(Op)) {
|
||||
unsigned Value = cast<ConstantSDNode>(Op)->getValue();
|
||||
if (Value >= 0 && Value <= 31)
|
||||
return Op;
|
||||
else
|
||||
return SDOperand(0,0);
|
||||
} else {
|
||||
return SDOperand(0,0);
|
||||
}
|
||||
break;
|
||||
case 'i':
|
||||
// Literal immediates are always ok.
|
||||
if (isa<ConstantSDNode>(Op)) return Op;
|
||||
|
Loading…
Reference in New Issue
Block a user