# HG changeset patch # User Mike Pavone # Date 1357796515 28800 # Node ID 924af8b2f7a0569de18ea507eafefbe3a151ada6 # Parent 3b4ef459aa8df1def1e0557a2b058f616aca50a4 Fix -(a7) dest when size is byte diff -r 3b4ef459aa8d -r 924af8b2f7a0 m68k_to_x86.c --- a/m68k_to_x86.c Wed Jan 09 21:08:37 2013 -0800 +++ b/m68k_to_x86.c Wed Jan 09 21:41:55 2013 -0800 @@ -392,7 +392,7 @@ ea->disp = reg_offset(&(inst->dst)); break; case MODE_AREG_PREDEC: - dec_amount = inst->extra.size == OPSIZE_WORD ? 2 : (inst->extra.size == OPSIZE_LONG ? 4 : 1); + dec_amount = inst->extra.size == OPSIZE_WORD ? 2 : (inst->extra.size == OPSIZE_LONG ? 4 : (inst->dst.params.regs.pri == 7 ? 2 : 1)); if (opts->aregs[inst->dst.params.regs.pri] >= 0) { out = sub_ir(out, dec_amount, opts->aregs[inst->dst.params.regs.pri], SZ_D); } else { @@ -780,7 +780,7 @@ dst = setcc_r(dst, CC_S, FLAG_N); break; case MODE_AREG_PREDEC: - dec_amount = inst->extra.size == OPSIZE_WORD ? 2 : (inst->extra.size == OPSIZE_LONG ? 4 : 1); + dec_amount = inst->extra.size == OPSIZE_WORD ? 2 : (inst->extra.size == OPSIZE_LONG ? 4 : (inst->dst.params.regs.pri == 7 ? 2 : 1)); if (opts->aregs[inst->dst.params.regs.pri] >= 0) { dst = sub_ir(dst, dec_amount, opts->aregs[inst->dst.params.regs.pri], SZ_D); } else {