Mercurial > repos > blastem
comparison m68k_core.c @ 1464:ffe45c5b8390
Fix unlk for the a7 case
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 08 Sep 2017 00:38:22 -0700 |
parents | aa945f1bdd71 |
children | afa3fbb76bff ded16f3d7eb4 |
comparison
equal
deleted
inserted
replaced
1463:63f309cfbef9 | 1464:ffe45c5b8390 |
---|---|
282 } | 282 } |
283 | 283 |
284 static void translate_m68k_unlk(m68k_options * opts, m68kinst * inst) | 284 static void translate_m68k_unlk(m68k_options * opts, m68kinst * inst) |
285 { | 285 { |
286 cycles(&opts->gen, BUS); | 286 cycles(&opts->gen, BUS); |
287 areg_to_native(opts, inst->dst.params.regs.pri, opts->aregs[7]); | 287 if (inst->dst.params.regs.pri != 7) { |
288 areg_to_native(opts, inst->dst.params.regs.pri, opts->aregs[7]); | |
289 } | |
288 areg_to_native(opts, 7, opts->gen.scratch1); | 290 areg_to_native(opts, 7, opts->gen.scratch1); |
289 call(&opts->gen.code, opts->read_32); | 291 call(&opts->gen.code, opts->read_32); |
290 native_to_areg(opts, opts->gen.scratch1, inst->dst.params.regs.pri); | 292 native_to_areg(opts, opts->gen.scratch1, inst->dst.params.regs.pri); |
291 addi_areg(opts, 4, 7); | 293 if (inst->dst.params.regs.pri != 7) { |
294 addi_areg(opts, 4, 7); | |
295 } | |
292 } | 296 } |
293 | 297 |
294 static void translate_m68k_link(m68k_options * opts, m68kinst * inst) | 298 static void translate_m68k_link(m68k_options * opts, m68kinst * inst) |
295 { | 299 { |
296 //compensate for displacement word | 300 //compensate for displacement word |