diff options
author | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2008-04-16 20:46:05 +0000 |
---|---|---|
committer | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2008-04-16 20:46:05 +0000 |
commit | a7557dfe71691a6406f2af76daaff29b515d3e85 (patch) | |
tree | e1d48396b56c82a14a330b964bcb985fdf6f43fd /llvm/lib/Target/Alpha/AlphaJITInfo.cpp | |
parent | b7066c75393275b1a39d03cda7eeede370d922ad (diff) | |
download | bcm5719-llvm-a7557dfe71691a6406f2af76daaff29b515d3e85.tar.gz bcm5719-llvm-a7557dfe71691a6406f2af76daaff29b515d3e85.zip |
Correlate stubs with functions in JIT: when emitting a stub, the JIT tells the memory manager which function
the stub will resolve.
llvm-svn: 49814
Diffstat (limited to 'llvm/lib/Target/Alpha/AlphaJITInfo.cpp')
-rw-r--r-- | llvm/lib/Target/Alpha/AlphaJITInfo.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaJITInfo.cpp b/llvm/lib/Target/Alpha/AlphaJITInfo.cpp index a20ae9fd5e5..4fd0ebcaef8 100644 --- a/llvm/lib/Target/Alpha/AlphaJITInfo.cpp +++ b/llvm/lib/Target/Alpha/AlphaJITInfo.cpp @@ -14,6 +14,7 @@ #define DEBUG_TYPE "jit" #include "AlphaJITInfo.h" #include "AlphaRelocations.h" +#include "llvm/Function.h" #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/Config/alloca.h" #include "llvm/Support/Debug.h" @@ -190,16 +191,17 @@ extern "C" { #endif } -void *AlphaJITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) { +void *AlphaJITInfo::emitFunctionStub(const Function* F, void *Fn, + MachineCodeEmitter &MCE) { //assert(Fn == AlphaCompilationCallback && "Where are you going?\n"); //Do things in a stupid slow way! - MCE.startFunctionStub(19*4); + MCE.startFunctionStub(F, 19*4); void* Addr = (void*)(intptr_t)MCE.getCurrentPCValue(); for (int x = 0; x < 19; ++ x) MCE.emitWordLE(0); EmitBranchToAt(Addr, Fn); DOUT << "Emitting Stub to " << Fn << " at [" << Addr << "]\n"; - return MCE.finishFunctionStub(0); + return MCE.finishFunctionStub(F); } TargetJITInfo::LazyResolverFn |