Mercurial > repos > blastem
changeset 1464:ffe45c5b8390
Fix unlk for the a7 case
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 08 Sep 2017 00:38:22 -0700 |
parents | 63f309cfbef9 |
children | 5d41d0574863 |
files | m68k_core.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/m68k_core.c Fri Sep 08 00:38:10 2017 -0700 +++ b/m68k_core.c Fri Sep 08 00:38:22 2017 -0700 @@ -284,11 +284,15 @@ static void translate_m68k_unlk(m68k_options * opts, m68kinst * inst) { cycles(&opts->gen, BUS); - areg_to_native(opts, inst->dst.params.regs.pri, opts->aregs[7]); + if (inst->dst.params.regs.pri != 7) { + areg_to_native(opts, inst->dst.params.regs.pri, opts->aregs[7]); + } areg_to_native(opts, 7, opts->gen.scratch1); call(&opts->gen.code, opts->read_32); native_to_areg(opts, opts->gen.scratch1, inst->dst.params.regs.pri); - addi_areg(opts, 4, 7); + if (inst->dst.params.regs.pri != 7) { + addi_areg(opts, 4, 7); + } } static void translate_m68k_link(m68k_options * opts, m68kinst * inst)