diff options
author | Dale Johannesen <dalej@apple.com> | 2009-07-07 00:18:49 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-07-07 00:18:49 +0000 |
commit | 69976cfc1450a5058c31790d7d508d148d3294e3 (patch) | |
tree | 783776e1e4b586c0cf6f33efc4575a7e11fb1447 /lib | |
parent | f4c240d81e00f59523e814b47b89c2a0fd8f636a (diff) | |
download | external_llvm-69976cfc1450a5058c31790d7d508d148d3294e3.zip external_llvm-69976cfc1450a5058c31790d7d508d148d3294e3.tar.gz external_llvm-69976cfc1450a5058c31790d7d508d148d3294e3.tar.bz2 |
Don't accept globals as matching 'i' constraint
in PIC modes (in accordance with existing comment).
gcc.apple/asm-block-25.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 5a6294a..fe60614 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -8803,10 +8803,15 @@ void X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op, continue; } } - + // Otherwise, this isn't something we can handle, reject it. return; } + // If we require an extra load to get this address, as in PIC mode, we + // can't accept it. + if (Subtarget->GVRequiresExtraLoad(GA->getGlobal(), + getTargetMachine(), false)) + return; if (hasMemory) Op = LowerGlobalAddress(GA->getGlobal(), Op.getDebugLoc(), Offset, DAG); |