[PowerPC] Load BlockAddress values from the TOC in 64-bit SVR4 code
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 31 Oct 2014 10:33:14 +0000 (10:33 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 31 Oct 2014 10:33:14 +0000 (10:33 +0000)
commit8a9c531e9adfdd7fee915fbcfb9ecad18da5674c
treee3bddf4039fa2f7a8b74205c46792f4dcf87e9c4
parent42187d2c0029969f3b6239e54b4cc5ed31e4d9e0
[PowerPC] Load BlockAddress values from the TOC in 64-bit SVR4 code

Since block address values can be larger than 2GB in 64-bit code, they
cannot be loaded simply using an @l / @ha pair, but instead must be
loaded from the TOC, just like GlobalAddress, ConstantPool, and
JumpTable values are.

The commit also fixes a bug in PPCLinuxAsmPrinter::doFinalization where
temporary labels could not be used as TOC values, since code would
attempt (and fail) to use GetOrCreateSymbol to create a symbol of the
same name as the temporary label.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220959 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCAsmPrinter.cpp
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCInstr64Bit.td
test/CodeGen/PowerPC/blockaddress.ll [new file with mode: 0644]