diff options
author | Chris Lattner <sabre@nondot.org> | 2009-06-15 04:01:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-06-15 04:01:39 +0000 |
commit | e4935150c71170ee0aa174e08282a6913148c04c (patch) | |
tree | 25d0c685a37228e613cfd06779b31b300347be53 | |
parent | a119de86a064414622562cfe32953de7f9b0ee40 (diff) |
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
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 36e3ab2e82..cb0b30c857 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -8468,6 +8468,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()); break; |