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 | 51cc3c13eac78da242f0518fc42580e48dd5304f (patch) | |
tree | 8cabb5d8c03920e8df85546c5c76465ae2dc131e /lib/Target/Alpha/AlphaJITInfo.cpp | |
parent | e20bbc81012e636cb59bbbe3a114895a2f7fa0da (diff) | |
download | external_llvm-51cc3c13eac78da242f0518fc42580e48dd5304f.zip external_llvm-51cc3c13eac78da242f0518fc42580e48dd5304f.tar.gz external_llvm-51cc3c13eac78da242f0518fc42580e48dd5304f.tar.bz2 |
Correlate stubs with functions in JIT: when emitting a stub, the JIT tells the memory manager which function
the stub will resolve.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaJITInfo.cpp')
-rw-r--r-- | lib/Target/Alpha/AlphaJITInfo.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/Alpha/AlphaJITInfo.cpp b/lib/Target/Alpha/AlphaJITInfo.cpp index a20ae9f..4fd0ebc 100644 --- a/lib/Target/Alpha/AlphaJITInfo.cpp +++ b/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 |