From e4935150c71170ee0aa174e08282a6913148c04c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 15 Jun 2009 04:01:39 +0000 Subject: [PATCH] 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 --- lib/Target/X86/X86ISelLowering.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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()); -- 2.34.1