[PowerPC] Use the ABI indirect-call protocol for patchpoints
authorHal Finkel <hfinkel@anl.gov>
Tue, 14 Jul 2015 22:26:06 +0000 (22:26 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 14 Jul 2015 22:26:06 +0000 (22:26 +0000)
commita8eaf29f90a027e7cf0ead54b730325b97940b0f
treea302f87853c6537d86aaa23d75b9eeb0c5e0da6f
parent7a6e3434ba2995d21851436b4338178f27365c24
[PowerPC] Use the ABI indirect-call protocol for patchpoints

We used to take the address specified as the direct target of the patchpoint
and did no TOC-pointer handling.  This, however, as not all that useful,
because MCJIT tends to create a lot of modules, and they have their own TOC
sections. Thus, to call from the generated code to other generated code, you
really need to switch TOC pointers. Make this work as expected, and under
ELFv1, tread the address as the function descriptor address so that the correct
TOC pointer can be loaded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242217 91177308-0d34-0410-b5e6-96231b3b80d8
docs/StackMaps.rst
lib/Target/PowerPC/PPCAsmPrinter.cpp
test/CodeGen/PowerPC/ppc64-anyregcc.ll
test/CodeGen/PowerPC/ppc64-patchpoint.ll
test/CodeGen/PowerPC/ppc64-stackmap.ll