From: Chris Lattner Date: Mon, 15 Jun 2009 04:01:39 +0000 (+0000) Subject: implement support for the 'K' asm constraint, PR4347 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e4935150c71170ee0aa174e08282a6913148c04c;p=oota-llvm.git 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 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 36e3ab2e82a..cb0b30c857e 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -8467,6 +8467,14 @@ void X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op, } return; case 'J': + if (ConstantSDNode *C = dyn_cast(Op)) { + if ((int8_t)C->getSExtValue() == C->getSExtValue()) { + Result = DAG.getTargetConstant(C->getZExtValue(), Op.getValueType()); + break; + } + } + return; + case 'K': if (ConstantSDNode *C = dyn_cast(Op)) { if (C->getZExtValue() <= 63) { Result = DAG.getTargetConstant(C->getZExtValue(), Op.getValueType());