When initializing the PIC global base register on ARM/ELF add pc to fix the address.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 16 Aug 2013 12:52:08 +0000 (12:52 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 16 Aug 2013 12:52:08 +0000 (12:52 +0000)
commit671aea08f8dfb09a0191e7b9e266c2884efd3252
treef7281df97d7c9ec5ce846ce619b519b8b0613a0a
parente97fc44045732de9fc4715241013f9238ec007dc
When initializing the PIC global base register on ARM/ELF add pc to fix the address.

This unbreaks PIC with fast isel on ELF targets (PR16717). The output matches
what GCC and SDag do for PIC but may not cover all of the many flavors of PIC
that exist.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188551 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMInstrInfo.cpp
test/CodeGen/ARM/fast-isel-pic.ll