diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-02 04:22:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-02 04:22:01 +0000 |
commit | 87bb642676b570638bb20b4651d50fe2d9822c57 (patch) | |
tree | aba8102c3a679292a35e698388f302e438331a80 /llvm/lib | |
parent | d1c5951615072e92cb253eccca7a7d948bbd5e77 (diff) | |
download | bcm5719-llvm-87bb642676b570638bb20b4651d50fe2d9822c57.tar.gz bcm5719-llvm-87bb642676b570638bb20b4651d50fe2d9822c57.zip |
@GOTPCREL is also rip-relative. Fix fast-isel to do the right thing.
This fixes an llvm-gcc bootstrap problem I introduced.
llvm-svn: 74691
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86FastISel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp index dcb8852a89b..b336d780c50 100644 --- a/llvm/lib/Target/X86/X86FastISel.cpp +++ b/llvm/lib/Target/X86/X86FastISel.cpp @@ -478,8 +478,10 @@ bool X86FastISel::X86SelectAddress(Value *V, X86AddressMode &AM, bool isCall) { Opc = X86::MOV64rm; RC = X86::GR64RegisterClass; - if (TM.getRelocationModel() != Reloc::Static) + if (TM.getRelocationModel() != Reloc::Static) { StubAM.GVOpFlags = X86II::MO_GOTPCREL; + StubAM.Base.Reg = X86::RIP; + } } unsigned ResultReg = createResultReg(RC); |