Some JIT fixes
This commit is contained in:
@@ -65,7 +65,7 @@ int JIT::Step() {
|
||||
}
|
||||
|
||||
Util::trace("[JIT]: Compiling block @ 0x{:016X}:", blockPC);
|
||||
// const auto blockInfo = code.getCurr();
|
||||
const auto blockInfo = code.getCurr();
|
||||
const auto block = code.getCurr<BlockFn>();
|
||||
blockCache[upperIndex][lowerIndex] = block;
|
||||
|
||||
@@ -82,7 +82,7 @@ int JIT::Step() {
|
||||
code.push(code.rbp);
|
||||
code.mov(code.rbp, reinterpret_cast<uintptr_t>(this)); // Load context pointer
|
||||
|
||||
// cs_insn *insn;
|
||||
cs_insn *insn;
|
||||
Util::trace("\tMIPS code (guest PC = 0x{:016X}):", blockPC);
|
||||
while (!instrInDelaySlot) {
|
||||
// CheckCompareInterrupt();
|
||||
@@ -106,7 +106,7 @@ int JIT::Step() {
|
||||
|
||||
const u32 instruction = mem.Read<u32>(regs, paddr);
|
||||
|
||||
/*u32 bswapped = bswap(instruction);
|
||||
u32 bswapped = bswap(instruction);
|
||||
auto count = cs_disasm(disassemblerMips, reinterpret_cast<const u8 *>(&bswapped), 4, blockPC, 0, &insn);
|
||||
|
||||
if (count > 0) {
|
||||
@@ -116,7 +116,7 @@ int JIT::Step() {
|
||||
Util::trace("\t\tCould not disassemble 0x{:08X} due to error {}\n", instruction, (int)cs_errno(disassemblerMips));
|
||||
}
|
||||
|
||||
if(ShouldServiceInterrupt()) {
|
||||
/*if(ShouldServiceInterrupt()) {
|
||||
regs.cop0.FireException(ExceptionCode::Interrupt, 0, blockPC);
|
||||
return 1;
|
||||
}*/
|
||||
@@ -155,7 +155,7 @@ int JIT::Step() {
|
||||
code.add(code.rsp, 8);
|
||||
code.ret();
|
||||
code.setProtectModeRE();
|
||||
/* static auto blockInfoSize = 0;
|
||||
static auto blockInfoSize = 0;
|
||||
blockInfoSize = code.getSize() - blockInfoSize;
|
||||
|
||||
Util::trace("\tX86 code (block address = 0x{:016X}):", (uintptr_t)block);
|
||||
@@ -166,7 +166,7 @@ int JIT::Step() {
|
||||
}
|
||||
|
||||
cs_free(insn, count);
|
||||
}*/
|
||||
}
|
||||
// const auto dump = code.getCode();
|
||||
// Util::WriteFileBinary(dump, code.getSize(), "jit.dump");
|
||||
// Util::panic("");
|
||||
|
||||
Reference in New Issue
Block a user