summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JIT
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
commitff2b4948ce67f1927310d8cd5cddbe7f098524e8 (patch)
treecc461a330a977d1d3898f83e07db1a8f2142b80c /llvm/lib/ExecutionEngine/JIT
parentdf851ff94f19a295a7b5d216c4294ed4776d7953 (diff)
downloadbcm5719-llvm-ff2b4948ce67f1927310d8cd5cddbe7f098524e8.tar.gz
bcm5719-llvm-ff2b4948ce67f1927310d8cd5cddbe7f098524e8.zip
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. llvm-svn: 58338
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 688d4984c20..44e6638562c 100644
--- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/llvm/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 +
OpenPOWER on IntegriCloud