mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-03 14:21:30 +00:00 
			
		
		
		
	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
This commit is contained in:
		@@ -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,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user