diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-01-05 02:26:58 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-05 02:26:58 +0000 |
commit | 2a3e08b5961353fa3faeadf81f481ae9f5463427 (patch) | |
tree | 480ae5513b731edf30a29cf969f552b7053d3bc1 /lib/Target/X86/X86JITInfo.h | |
parent | 9bb459b55411c45175e599f6f421b7a57060ee57 (diff) | |
download | external_llvm-2a3e08b5961353fa3faeadf81f481ae9f5463427.zip external_llvm-2a3e08b5961353fa3faeadf81f481ae9f5463427.tar.gz external_llvm-2a3e08b5961353fa3faeadf81f481ae9f5463427.tar.bz2 |
X86 JIT PIC jumptable support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45616 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86JITInfo.h')
-rw-r--r-- | lib/Target/X86/X86JITInfo.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/X86/X86JITInfo.h b/lib/Target/X86/X86JITInfo.h index f163904..183e2f2 100644 --- a/lib/Target/X86/X86JITInfo.h +++ b/lib/Target/X86/X86JITInfo.h @@ -21,6 +21,7 @@ namespace llvm { class X86JITInfo : public TargetJITInfo { X86TargetMachine &TM; + intptr_t PICBase; public: X86JITInfo(X86TargetMachine &tm) : TM(tm) {useGOT = 0;} @@ -40,6 +41,10 @@ namespace llvm { /// address. virtual void *emitFunctionStub(void *Fn, MachineCodeEmitter &MCE); + /// getPICJumpTableEntry - Returns the value of the jumptable entry for the + /// specific basic block. + virtual intptr_t getPICJumpTableEntry(intptr_t BB, intptr_t JTBase); + /// getLazyResolverFunction - Expose the lazy resolver to the JIT. virtual LazyResolverFn getLazyResolverFunction(JITCompilerFn); @@ -48,6 +53,11 @@ namespace llvm { /// referenced global symbols. virtual void relocate(void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char* GOTBase); + + /// setPICBase / getPICBase - Getter / setter of PICBase, used to compute + /// PIC jumptable entry. + void setPICBase(intptr_t Base) { PICBase = Base; } + intptr_t getPICBase() const { return PICBase; } }; } |