mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Reflect MachineConstantPoolEntry changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30277 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9a7746d784
commit
cd5731d98b
@ -861,8 +861,11 @@ void JITEmitter::emitConstantPool(MachineConstantPool *MCP) {
|
|||||||
const std::vector<MachineConstantPoolEntry> &Constants = MCP->getConstants();
|
const std::vector<MachineConstantPoolEntry> &Constants = MCP->getConstants();
|
||||||
if (Constants.empty()) return;
|
if (Constants.empty()) return;
|
||||||
|
|
||||||
unsigned Size = Constants.back().Offset;
|
MachineConstantPoolEntry CPE = Constants.back();
|
||||||
Size += TheJIT->getTargetData()->getTypeSize(Constants.back().Val->getType());
|
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());
|
ConstantPoolBase = allocateSpace(Size, 1 << MCP->getConstantPoolAlignment());
|
||||||
ConstantPool = MCP;
|
ConstantPool = MCP;
|
||||||
@ -872,7 +875,13 @@ void JITEmitter::emitConstantPool(MachineConstantPool *MCP) {
|
|||||||
// Initialize the memory for all of the constant pool entries.
|
// Initialize the memory for all of the constant pool entries.
|
||||||
for (unsigned i = 0, e = Constants.size(); i != e; ++i) {
|
for (unsigned i = 0, e = Constants.size(); i != e; ++i) {
|
||||||
void *CAddr = (char*)ConstantPoolBase+Constants[i].Offset;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user