From 8ba7f3897a02057091e8850b9b44de7f30062bac Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Sun, 9 Feb 2014 00:42:43 -0800 Subject: Properly handle jmp instructions in the debugger next command --- m68k_to_x86.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'm68k_to_x86.c') diff --git a/m68k_to_x86.c b/m68k_to_x86.c index 219d4c9..4a6f7fb 100644 --- a/m68k_to_x86.c +++ b/m68k_to_x86.c @@ -1953,6 +1953,7 @@ uint8_t * translate_m68k_jmp(uint8_t * dst, m68kinst * inst, x86_68k_options * o } sec_reg = (inst->src.params.regs.sec >> 1) & 0x7; if (inst->src.params.regs.sec & 1) { + //32-bit index register if (inst->src.params.regs.sec & 0x10) { if (opts->aregs[sec_reg] >= 0) { dst = add_rr(dst, opts->aregs[sec_reg], SCRATCH1, SZ_D); @@ -1967,6 +1968,7 @@ uint8_t * translate_m68k_jmp(uint8_t * dst, m68kinst * inst, x86_68k_options * o } } } else { + //16-bit index register if (inst->src.params.regs.sec & 0x10) { if (opts->aregs[sec_reg] >= 0) { dst = movsx_rr(dst, opts->aregs[sec_reg], SCRATCH2, SZ_W, SZ_D); -- cgit v1.2.3