[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)
commit58884f9fe69227f6d4db751f4cd5d1a427c5a3ac
treeea375640268967bfef55402ddae887e7b24bc588
parenta8cd15249a18d65cb7e6367d0ec77fe6b1be0565
[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.

llvm-svn: 226403
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp