changeset 585:82aadd5d103a

Use swap_ssp_usp in translate_m68k_move_ccr_sr
author Michael Pavone <pavone@retrodev.com>
date Fri, 07 Mar 2014 19:39:51 -0800
parents b6713c1b6f55
children aa35ccb90aa9
files m68k_core_x86.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/m68k_core_x86.c	Fri Mar 07 19:35:13 2014 -0800
+++ b/m68k_core_x86.c	Fri Mar 07 19:39:51 2014 -0800
@@ -2067,9 +2067,7 @@
 			mov_irdisp(code, (src_op->disp >> 8), opts->gen.context_reg, offsetof(m68k_context, status), SZ_B);
 			if (!((inst->src.params.immed >> 8) & (1 << BIT_SUPERVISOR))) {
 				//leave supervisor mode
-				mov_rr(code, opts->aregs[7], opts->gen.scratch1, SZ_D);
-				mov_rdispr(code, opts->gen.context_reg, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, opts->aregs[7], SZ_D);
-				mov_rrdisp(code, opts->gen.scratch1, opts->gen.context_reg, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, SZ_D);
+				swap_ssp_usp(opts);
 			}
 			call(code, opts->do_sync);
 		}
@@ -2084,7 +2082,6 @@
 		}
 		call(code, inst->op == M68K_MOVE_SR ? opts->set_sr : opts->set_ccr);
 		cycles(&opts->gen, 12);
-
 	}
 }