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 | 880b080887e59879a45bf24f852f44b2976d8e52 (patch) | |
tree | 8795e98ea89598ef3bc716d0027d2708c665f52c /llvm/lib/Target/X86/X86JITInfo.cpp | |
parent | 7b1b947ca10a613d583ffa7c399575cd70946b81 (diff) | |
download | bcm5719-llvm-880b080887e59879a45bf24f852f44b2976d8e52.tar.gz bcm5719-llvm-880b080887e59879a45bf24f852f44b2976d8e52.zip |
X86 JIT PIC jumptable support.
llvm-svn: 45616
Diffstat (limited to 'llvm/lib/Target/X86/X86JITInfo.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86JITInfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86JITInfo.cpp b/llvm/lib/Target/X86/X86JITInfo.cpp index d5d3cda2dc6..dd451176568 100644 --- a/llvm/lib/Target/X86/X86JITInfo.cpp +++ b/llvm/lib/Target/X86/X86JITInfo.cpp @@ -440,6 +440,12 @@ void *X86JITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) { return MCE.finishFunctionStub(0); } +/// getPICJumpTableEntry - Returns the value of the jumptable entry for the +/// specific basic block. +intptr_t X86JITInfo::getPICJumpTableEntry(intptr_t BB, intptr_t Entry) { + return BB - PICBase; +} + /// relocate - Before the JIT can run a block of code that has been emitted, /// it must rewrite the code to contain the actual addresses of any /// referenced global symbols. |