implement support for the 'K' asm constraint, PR4347

llvm-svn: 73366
This commit is contained in:
Chris Lattner 2009-06-15 04:01:39 +00:00
parent f2d49da9a8
commit ea3621a6b1
1 changed files with 8 additions and 0 deletions

View File

@ -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());