diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-01-09 21:41:55 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-01-09 21:41:55 -0800 |
commit | e50421bfff3bf6fe2313525d3bc5d103b7f9e98d (patch) | |
tree | bdb1556b761579372fa580703e8460d4df7b4fa8 /m68k_to_x86.c | |
parent | 6183c3ba67d069c0ec8619248cc39ae76958ebdc (diff) |
Fix -(a7) dest when size is byte
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 67942d7..0fbd2bf 100644 --- a/m68k_to_x86.c +++ b/m68k_to_x86.c @@ -392,7 +392,7 @@ uint8_t * translate_m68k_dst(m68kinst * inst, x86_ea * ea, uint8_t * out, x86_68 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 @@ uint8_t * translate_m68k_move(uint8_t * dst, m68kinst * inst, x86_68k_options * 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 { |