diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-01-05 00:53:50 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-01-05 00:53:50 -0800 |
commit | aa7e687734703551bade9688baa81edf2df94efe (patch) | |
tree | 66827e8a933ea8bed8be366d7188bb42e21bb5bd /m68k_to_x86.c | |
parent | 8379b35bc69ed9b1b41ad0f62e65f1e1484d549b (diff) |
Fix predec address mode when used as source
Diffstat (limited to 'm68k_to_x86.c')
-rw-r--r-- | m68k_to_x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/m68k_to_x86.c b/m68k_to_x86.c index 8120f04..2ae0dc5 100644 --- a/m68k_to_x86.c +++ b/m68k_to_x86.c @@ -130,9 +130,9 @@ uint8_t * translate_m68k_src(m68kinst * inst, x86_ea * ea, uint8_t * out, x86_68 dec_amount = inst->extra.size == OPSIZE_WORD ? 2 : (inst->extra.size == OPSIZE_LONG ? 4 : 1); out = cycles(out, PREDEC_PENALTY); if (opts->aregs[inst->src.params.regs.pri] >= 0) { - out = sub_ir(out, inc_amount, opts->aregs[inst->src.params.regs.pri], SZ_D); + out = sub_ir(out, dec_amount, opts->aregs[inst->src.params.regs.pri], SZ_D); } else { - out = sub_irdisp8(out, inc_amount, CONTEXT, reg_offset(&(inst->src)), SZ_D); + out = sub_irdisp8(out, dec_amount, CONTEXT, reg_offset(&(inst->src)), SZ_D); } case MODE_AREG_INDIRECT: case MODE_AREG_POSTINC: |