forked from OSchip/llvm-project
implement support for the 'K' asm constraint, PR4347
llvm-svn: 73366
This commit is contained in:
parent
f2d49da9a8
commit
ea3621a6b1
|
@ -8467,6 +8467,14 @@ void X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
|
|||
}
|
||||
return;
|
||||
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 (C->getZExtValue() <= 63) {
|
||||
Result = DAG.getTargetConstant(C->getZExtValue(), Op.getValueType());
|
||||
|
|
Loading…
Reference in New Issue