mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-14 17:34:41 +00:00
Add debugging code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49566 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6098e4be94
commit
97b8c40d09
@ -233,8 +233,7 @@ unsigned JITResolver::getGOTIndexForAddr(void* addr) {
|
||||
if (!idx) {
|
||||
idx = ++nextGOTIndex;
|
||||
revGOTMap[addr] = idx;
|
||||
DOUT << "Adding GOT entry " << idx
|
||||
<< " for addr " << addr << "\n";
|
||||
DOUT << "Adding GOT entry " << idx << " for addr " << addr << "\n";
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
@ -746,11 +745,15 @@ void JITEmitter::emitConstantPool(MachineConstantPool *MCP) {
|
||||
? CPE.Val.MachineCPVal->getType() : CPE.Val.ConstVal->getType();
|
||||
Size += TheJIT->getTargetData()->getABITypeSize(Ty);
|
||||
|
||||
ConstantPoolBase = allocateSpace(Size, 1 << MCP->getConstantPoolAlignment());
|
||||
unsigned Align = 1 << MCP->getConstantPoolAlignment();
|
||||
ConstantPoolBase = allocateSpace(Size, Align);
|
||||
ConstantPool = MCP;
|
||||
|
||||
if (ConstantPoolBase == 0) return; // Buffer overflow.
|
||||
|
||||
DOUT << "JIT: Emitted constant pool at [" << ConstantPoolBase
|
||||
<< "] (size: " << Size << ", alignment: " << Align << ")\n";
|
||||
|
||||
// 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;
|
||||
@ -761,6 +764,7 @@ void JITEmitter::emitConstantPool(MachineConstantPool *MCP) {
|
||||
abort();
|
||||
}
|
||||
TheJIT->InitializeMemory(Constants[i].Val.ConstVal, CAddr);
|
||||
DOUT << "JIT: CP" << i << " at [" << CAddr << "]\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user