Mercurial > repos > blastem
changeset 218:1abf8e967b33
Fix autoincrement on a7 when used as a destination in a byte sized instruction
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 20 Apr 2013 00:36:50 -0700 |
parents | acd29e2664c6 |
children | 8d3c16071559 |
files | m68k_to_x86.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/m68k_to_x86.c Sat Apr 20 00:29:14 2013 -0700 +++ b/m68k_to_x86.c Sat Apr 20 00:36:50 2013 -0700 @@ -438,7 +438,7 @@ } if (inst->dst.addr_mode == MODE_AREG_POSTINC) { - inc_amount = inst->extra.size == OPSIZE_WORD ? 2 : (inst->extra.size == OPSIZE_LONG ? 4 : 1); + inc_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 = add_ir(out, inc_amount, opts->aregs[inst->dst.params.regs.pri], SZ_D); } else { @@ -891,7 +891,7 @@ break; } if (inst->dst.addr_mode == MODE_AREG_POSTINC) { - inc_amount = inst->extra.size == OPSIZE_WORD ? 2 : (inst->extra.size == OPSIZE_LONG ? 4 : 1); + inc_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 = add_ir(dst, inc_amount, opts->aregs[inst->dst.params.regs.pri], SZ_D); } else {