aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2008-10-28 18:25:49 +0000
committerJim Grosbach <grosbach@apple.com>2008-10-28 18:25:49 +0000
commitcd40d8954058f9dbfd9192fd0d5f8e0f8d00fa10 (patch)
treee847d88829c437fff384f2e3bcba11fffc5eefce /lib/ExecutionEngine
parent72a8fd2f7a6060788ead620d1d5d6e609fb3f6e3 (diff)
downloadexternal_llvm-cd40d8954058f9dbfd9192fd0d5f8e0f8d00fa10.zip
external_llvm-cd40d8954058f9dbfd9192fd0d5f8e0f8d00fa10.tar.gz
external_llvm-cd40d8954058f9dbfd9192fd0d5f8e0f8d00fa10.tar.bz2
Support for constant islands in the ARM JIT.
Since the ARM constant pool handling supercedes the standard LLVM constant pool entirely, the JIT emitter does not allocate space for the constants, nor initialize the memory. The constant pool is considered part of the instruction stream. Likewise, when resolving relocations into the constant pool, a hook into the target back end is used to resolve from the constant ID# to the address where the constant is stored. For now, the support in the ARM emitter is limited to 32-bit integer. Future patches will expand this to the full range of constants necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 688d498..44e6638 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -1011,6 +1011,11 @@ void* JITEmitter::allocateSpace(intptr_t Size, unsigned Alignment) {
}
void JITEmitter::emitConstantPool(MachineConstantPool *MCP) {
+ if (TheJIT->getJITInfo().hasCustomConstantPool()) {
+ DOUT << "JIT: Target has custom constant pool handling. Omitting standard "
+ "constant pool\n";
+ return;
+ }
const std::vector<MachineConstantPoolEntry> &Constants = MCP->getConstants();
if (Constants.empty()) return;
@@ -1124,6 +1129,10 @@ void *JITEmitter::finishFunctionStub(const GlobalValue* F) {
// method.
//
intptr_t JITEmitter::getConstantPoolEntryAddress(unsigned ConstantNum) const {
+ if (TheJIT->getJITInfo().hasCustomConstantPool()) {
+ return TheJIT->getJITInfo().getCustomConstantPoolEntryAddress(ConstantNum);
+ }
+
assert(ConstantNum < ConstantPool->getConstants().size() &&
"Invalid ConstantPoolIndex!");
return (intptr_t)ConstantPoolBase +