diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-07-16 01:33:08 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-07-16 01:33:08 +0000 |
commit | 81fb5feedea18e6c90e5206859fcfdbad5c4714c (patch) | |
tree | a1bf31c16b927e69a0c752461c80ffffedf1e41d /lib | |
parent | 9c578eb22348f38be8399b483250c0c53c7f13f3 (diff) |
X86-64 PIC jump table values are different from x86-32 cases, they are dest - table base.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/X86JITInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/X86/X86JITInfo.cpp b/lib/Target/X86/X86JITInfo.cpp index fd495c7588..0cda7d3a43 100644 --- a/lib/Target/X86/X86JITInfo.cpp +++ b/lib/Target/X86/X86JITInfo.cpp @@ -463,7 +463,11 @@ void *X86JITInfo::emitFunctionStub(const Function* F, void *Fn, /// getPICJumpTableEntry - Returns the value of the jumptable entry for the /// specific basic block. intptr_t X86JITInfo::getPICJumpTableEntry(intptr_t BB, intptr_t Entry) { +#if defined(X86_64_JIT) + return BB - Entry; +#else return BB - PICBase; +#endif } /// relocate - Before the JIT can run a block of code that has been emitted, |