mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-14 06:29:38 +00:00
Support 'I' inline asm constraint.
llvm-svn: 35129
This commit is contained in:
parent
25d4052af6
commit
b38c2ec89c
@ -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…
x
Reference in New Issue
Block a user