MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / logBlock

Function logBlock

source/emulation/cpu/jit/jitCodeGen.cpp:84–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83#ifdef _DEBUG
84static void logBlock(CPU* cpu, U32 address, DecodedOp* op, U32 len) {
85 static BWriteFile file;
86 static int count;
87
88 count++;
89 if (!file.isOpen()) {
90 file.createNew("jit.txt");
91 }
92 BString name = cpu->thread->process->getModuleName(address);
93 U32 offset = cpu->thread->process->getModuleEip(address);
94 file.writeFormat("Block %d in %s(%x)\n", count, name.c_str(), offset);
95 while (op && len) {
96 if (op->isDirectBranch()) {
97 file.writeFormat("%x %x %s -> %x\n", cpu->thread->process->id, address, op->toString().c_str(), (address + op->len + op->imm));
98 } else {
99 file.writeFormat("%x %x %s\n", cpu->thread->process->id, address, op->toString().c_str());
100 }
101 address += op->len;
102 len -= op->len;
103 op = op->next;
104 }
105 file.write("\n");
106 file.flush();
107}
108#endif
109
110bool JitCodeGen::calculateLongestBlock(DecodedOp* op) {

Callers 1

commitJITMethod · 0.85

Calls 10

createNewMethod · 0.80
getModuleNameMethod · 0.80
getModuleEipMethod · 0.80
writeFormatMethod · 0.80
isDirectBranchMethod · 0.80
isOpenMethod · 0.45
c_strMethod · 0.45
toStringMethod · 0.45
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected