Fix bug in instrumentation code

This commit is contained in:
David Guillen Fandos 2023-11-03 01:01:56 +01:00
parent 875c192257
commit 723d23adf8

4
cpu.cc
View file

@ -1613,7 +1613,7 @@ arm_loop:
}
#ifdef TRACE_INSTRUCTIONS
interp_trace_instruction(pc, 1);
interp_trace_instruction(reg[REG_PC], 1);
#endif
switch((opcode >> 20) & 0xFF)
@ -3106,7 +3106,7 @@ thumb_loop:
opcode = readaddress16(pc_address_block, (reg[REG_PC] & 0x7FFF));
#ifdef TRACE_INSTRUCTIONS
interp_trace_instruction(pc, 0);
interp_trace_instruction(reg[REG_PC], 0);
#endif
switch((opcode >> 8) & 0xFF)