[PowerPC] Don't hard-code R2 as register when processing TOC relocations
authorHal Finkel <hfinkel@anl.gov>
Sun, 18 Jan 2015 15:59:44 +0000 (15:59 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 18 Jan 2015 15:59:44 +0000 (15:59 +0000)
commit341223ee0a769d10adf77acf3e7104164094d4bf
tree19065f522a4b9ad1ef4257c01c6c00cf04fbc965
parent180f89537ac8a53025b528540746debde034bf62
[PowerPC] Don't hard-code R2 as register when processing TOC relocations

Instructions that have high-order TOC relocations always carry R2 as their base
register, so it does not matter whether we take the register from the
instruction or just hard-code it in PPCAsmPrinter. In the future, however, we
might want to apply these relocations to instructions using a different
register, so taking the register from the instruction is a better thing to do.
No change in functionality here, however.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226403 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCAsmPrinter.cpp