diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-07-02 03:14:25 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-07-02 03:14:25 +0000 |
| commit | 3b7f10a5a1cfbc6977447f4b6c724777ea793dca (patch) | |
| tree | 7a903cd82f0d0638d5983ddb86ae3e09b348b4fb /lib/Target/X86 | |
| parent | 92697b5350428e6f012fef27dbb9aedad95032e7 (diff) | |
| download | external_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.cpp | 4 |
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. |
