[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
Evan Cheng
evan.cheng at apple.com
Tue Sep 12 14:00:14 PDT 2006
Changes in directory llvm/lib/ExecutionEngine/JIT:
JITEmitter.cpp updated: 1.112 -> 1.113
---
Log message:
Reflect MachineConstantPoolEntry changes.
---
Diffs of the changes: (+12 -3)
JITEmitter.cpp | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.112 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.113
--- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.112 Sun Sep 10 18:03:44 2006
+++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Tue Sep 12 15:59:59 2006
@@ -861,8 +861,11 @@
const std::vector<MachineConstantPoolEntry> &Constants = MCP->getConstants();
if (Constants.empty()) return;
- unsigned Size = Constants.back().Offset;
- Size += TheJIT->getTargetData()->getTypeSize(Constants.back().Val->getType());
+ MachineConstantPoolEntry CPE = Constants.back();
+ unsigned Size = CPE.Offset;
+ const Type *Ty = CPE.isMachineConstantPoolEntry()
+ ? CPE.Val.ConstVal->getType() : CPE.Val.MachineCPVal->getType();
+ Size += TheJIT->getTargetData()->getTypeSize(Ty);
ConstantPoolBase = allocateSpace(Size, 1 << MCP->getConstantPoolAlignment());
ConstantPool = MCP;
@@ -872,7 +875,13 @@
// Initialize the memory for all of the constant pool entries.
for (unsigned i = 0, e = Constants.size(); i != e; ++i) {
void *CAddr = (char*)ConstantPoolBase+Constants[i].Offset;
- TheJIT->InitializeMemory(Constants[i].Val, CAddr);
+ if (Constants[i].isMachineConstantPoolEntry()) {
+ // FIXME: add support to lower machine constant pool values into bytes!
+ std::cerr << "Initialize memory with machine specific constant pool entry"
+ << " has not been implemented!\n";
+ abort();
+ }
+ TheJIT->InitializeMemory(Constants[i].Val.ConstVal, CAddr);
}
}
More information about the llvm-commits
mailing list