Illegal instruction handler now also logs opcode before the previous.

This commit is contained in:
OBattler
2016-08-09 06:08:48 +02:00
parent 8624d8d1f0
commit 403433c589

View File

@@ -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;