aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86
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
commit3b7f10a5a1cfbc6977447f4b6c724777ea793dca (patch)
tree7a903cd82f0d0638d5983ddb86ae3e09b348b4fb /lib/Target/X86
parent92697b5350428e6f012fef27dbb9aedad95032e7 (diff)
downloadexternal_llvm-3b7f10a5a1cfbc6977447f4b6c724777ea793dca.zip
external_llvm-3b7f10a5a1cfbc6977447f4b6c724777ea793dca.tar.gz
external_llvm-3b7f10a5a1cfbc6977447f4b6c724777ea793dca.tar.bz2
Fix yet-another bug I introduced into fastisel, this time handling
constant pool references that weren't getting properly rip-relative. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74689 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r--lib/Target/X86/X86FastISel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp
index bd994de..dcb8852 100644
--- a/lib/Target/X86/X86FastISel.cpp
+++ b/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.