mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
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:
parent
368f20fda4
commit
84f7fd2483
@ -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