Support 'I' inline asm constraint.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35129 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2007-03-17 00:13:28 +00:00
parent 368f20fda4
commit 84f7fd2483

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;