summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-02 03:14:25 +0000
committerChris Lattner <sabre@nondot.org>2009-07-02 03:14:25 +0000
commitd1c5951615072e92cb253eccca7a7d948bbd5e77 (patch)
tree5f0394763e0dfaa633c9b82046bcb76c6125e01b /llvm/lib
parenta065149f39ae47c12df282a65573f3d88d2c3c18 (diff)
downloadbcm5719-llvm-d1c5951615072e92cb253eccca7a7d948bbd5e77.tar.gz
bcm5719-llvm-d1c5951615072e92cb253eccca7a7d948bbd5e77.zip
Fix yet-another bug I introduced into fastisel, this time handling
constant pool references that weren't getting properly rip-relative. llvm-svn: 74689
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86FastISel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index bd994dea8f4..dcb8852a89b 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -1514,7 +1514,9 @@ unsigned X86FastISel::TargetMaterializeConstant(Constant *C) {
} else if (Subtarget->isPICStyleGOT()) {
OpFlag = X86II::MO_GOTOFF;
PICBase = getInstrInfo()->getGlobalBaseReg(&MF);
- }
+ } else if (Subtarget->isPICStyleRIPRel() &&
+ TM.getCodeModel() == CodeModel::Small)
+ PICBase = X86::RIP;
}
// Create the load from the constant pool.
OpenPOWER on IntegriCloud