1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Support 'I' inline asm constraint.

llvm-svn: 35129
This commit is contained in:
Devang Patel 2007-03-17 00:13:28 +00:00
parent f756184c5e
commit 2dabb16eac

View File

@ -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;