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 | 6a34939af63763406c8ef10e7e12ebe90f5a85d2 (patch) | |
| tree | 30e988887489213f81f0b1f6544c748cf3223876 /llvm/lib/ExecutionEngine | |
| parent | 0c9b90aba3463feb7ee7f9ea184026f7dbf96e56 (diff) | |
| download | bcm5719-llvm-6a34939af63763406c8ef10e7e12ebe90f5a85d2.tar.gz bcm5719-llvm-6a34939af63763406c8ef10e7e12ebe90f5a85d2.zip | |
Added jump table address relocation.
llvm-svn: 28908
Diffstat (limited to 'llvm/lib/ExecutionEngine')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index 4300b177379..ef9e43a44f7 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/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); | 

