diff --git a/src/386_dynarec.c b/src/386_dynarec.c index 122d4a493..33313f120 100644 --- a/src/386_dynarec.c +++ b/src/386_dynarec.c @@ -267,10 +267,12 @@ void x86_int_sw(int num) CPU_BLOCK_END(); } +int prev_opcode = 0; + void x86illegal() { uint16_t addr; - pclog("x86 illegal %04X %08X %04X:%08X %02X\n",msw,cr0,CS,cpu_state.pc,opcode); + pclog("x86 illegal %04X %08X %04X:%08X %02X (prev. %02X)\n",msw,cr0,CS,cpu_state.pc,opcode,prev_opcode); // if (output) // { @@ -1268,6 +1270,7 @@ void exec386_dynarec(int cycs) if (!abrt) { trap = flags & T_FLAG; + prev_opcode = opcode; opcode = fetchdat & 0xFF; fetchdat >>= 8; @@ -1419,6 +1422,7 @@ inrecomp=0; if (!abrt) { trap = flags & T_FLAG; + prev_opcode = opcode; opcode = fetchdat & 0xFF; fetchdat >>= 8; @@ -1498,6 +1502,7 @@ inrecomp=0; if (!abrt) { trap = flags & T_FLAG; + prev_opcode = opcode; opcode = fetchdat & 0xFF; fetchdat >>= 8;