[llvm-commits] [llvm] r153938 - /llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp
Anton Korobeynikov
asl at math.spbu.ru
Mon Apr 2 23:59:28 PDT 2012
Author: asl
Date: Tue Apr 3 01:59:28 2012
New Revision: 153938
URL: http://llvm.org/viewvc/llvm-project?rev=153938&view=rev
Log:
Make PPCCompilationCallbackC function to be static, so there will be no need to issue call via
PLT when LLVM is built as shared library. This mimics the X86 backend towards the approach.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp?rev=153938&r1=153937&r2=153938&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp Tue Apr 3 01:59:28 2012
@@ -291,9 +291,10 @@
}
#endif
-extern "C" void *PPCCompilationCallbackC(unsigned *StubCallAddrPlus4,
- unsigned *OrigCallAddrPlus4,
- bool is64Bit) {
+extern "C" {
+static void* LLVM_ATTRIBUTE_USED PPCCompilationCallbackC(unsigned *StubCallAddrPlus4,
+ unsigned *OrigCallAddrPlus4,
+ bool is64Bit) {
// Adjust the pointer to the address of the call instruction in the stub
// emitted by emitFunctionStub, rather than the instruction after it.
unsigned *StubCallAddr = StubCallAddrPlus4 - 1;
@@ -337,6 +338,7 @@
// stack after we restore all regs.
return Target;
}
+}
More information about the llvm-commits
mailing list