summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-07-07 00:18:49 +0000
committerDale Johannesen <dalej@apple.com>2009-07-07 00:18:49 +0000
commit56a53d02e10fc05bb35dd44e7fcacc13bbe35a98 (patch)
treed8e5d950fb993856ec3f8287aa3cd5dd665ce901 /llvm/lib
parent0086a5a3bb7137fad41d3b50e1cfb0c062b08c3a (diff)
downloadbcm5719-llvm-56a53d02e10fc05bb35dd44e7fcacc13bbe35a98.tar.gz
bcm5719-llvm-56a53d02e10fc05bb35dd44e7fcacc13bbe35a98.zip
Don't accept globals as matching 'i' constraint
in PIC modes (in accordance with existing comment). gcc.apple/asm-block-25.c llvm-svn: 74886
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 5a6294a211c..fe60614beb8 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud