mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-01 17:29:33 +00:00
implement support for the 'K' asm constraint, PR4347
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73366 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a119de86a0
commit
e4935150c7
@ -8467,6 +8467,14 @@ void X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 'J':
|
case 'J':
|
||||||
|
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
|
||||||
|
if ((int8_t)C->getSExtValue() == C->getSExtValue()) {
|
||||||
|
Result = DAG.getTargetConstant(C->getZExtValue(), Op.getValueType());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
case 'K':
|
||||||
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
|
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
|
||||||
if (C->getZExtValue() <= 63) {
|
if (C->getZExtValue() <= 63) {
|
||||||
Result = DAG.getTargetConstant(C->getZExtValue(), Op.getValueType());
|
Result = DAG.getTargetConstant(C->getZExtValue(), Op.getValueType());
|
||||||
|
Loading…
Reference in New Issue
Block a user