[llvm-commits] [llvm] r53660 - /llvm/trunk/lib/Target/X86/X86JITInfo.cpp

Evan Cheng evan.cheng at apple.com
Tue Jul 15 18:33:09 PDT 2008


Author: evancheng
Date: Tue Jul 15 20:33:08 2008
New Revision: 53660

URL: http://llvm.org/viewvc/llvm-project?rev=53660&view=rev
Log:
X86-64 PIC jump table values are different from x86-32 cases, they are dest - table base.

Modified:
    llvm/trunk/lib/Target/X86/X86JITInfo.cpp

Modified: llvm/trunk/lib/Target/X86/X86JITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86JITInfo.cpp?rev=53660&r1=53659&r2=53660&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86JITInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86JITInfo.cpp Tue Jul 15 20:33:08 2008
@@ -463,7 +463,11 @@
 /// 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,





More information about the llvm-commits mailing list