diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-06-23 01:02:37 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-06-23 01:02:37 +0000 |
commit | 52b510b4c4f36f58c4aa37a1f835eb95e89e0adb (patch) | |
tree | 849f77c8561690d908b0083dd43c49b9a3ec5b26 /lib/ExecutionEngine/JIT/JITEmitter.cpp | |
parent | 74cb064a352b2ead0c8f5a40dbf1cd9a82d5354a (diff) |
Added jump table address relocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28908 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JITEmitter.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index 4300b17737..ef9e43a44f 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -786,9 +786,13 @@ bool JITEmitter::finishFunction(MachineFunction &F) { ResultPtr = getPointerToGlobal(MR.getGlobalValue(), BufferBegin+MR.getMachineCodeOffset(), MR.doesntNeedFunctionStub()); - } else { + } else if (MR.isConstantPoolIndex()){ assert(MR.isConstantPoolIndex()); ResultPtr=(void*)getConstantPoolEntryAddress(MR.getConstantPoolIndex()); + } else { + assert(MR.isJumpTableIndex()); + ResultPtr=(void*)getJumpTableEntryAddress(MR.getJumpTableIndex()); + } MR.setResultPointer(ResultPtr); |