Mercurial > repos > blastem
comparison m68k_core_x86.c @ 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 |
comparison
equal
deleted
inserted
replaced
584:b6713c1b6f55 | 585:82aadd5d103a |
---|---|
2065 update_flags(opts, flag_mask); | 2065 update_flags(opts, flag_mask); |
2066 if (inst->op == M68K_MOVE_SR) { | 2066 if (inst->op == M68K_MOVE_SR) { |
2067 mov_irdisp(code, (src_op->disp >> 8), opts->gen.context_reg, offsetof(m68k_context, status), SZ_B); | 2067 mov_irdisp(code, (src_op->disp >> 8), opts->gen.context_reg, offsetof(m68k_context, status), SZ_B); |
2068 if (!((inst->src.params.immed >> 8) & (1 << BIT_SUPERVISOR))) { | 2068 if (!((inst->src.params.immed >> 8) & (1 << BIT_SUPERVISOR))) { |
2069 //leave supervisor mode | 2069 //leave supervisor mode |
2070 mov_rr(code, opts->aregs[7], opts->gen.scratch1, SZ_D); | 2070 swap_ssp_usp(opts); |
2071 mov_rdispr(code, opts->gen.context_reg, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, opts->aregs[7], SZ_D); | |
2072 mov_rrdisp(code, opts->gen.scratch1, opts->gen.context_reg, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, SZ_D); | |
2073 } | 2071 } |
2074 call(code, opts->do_sync); | 2072 call(code, opts->do_sync); |
2075 } | 2073 } |
2076 cycles(&opts->gen, 12); | 2074 cycles(&opts->gen, 12); |
2077 } else { | 2075 } else { |
2082 mov_rdispr(code, src_op->base, src_op->disp, opts->gen.scratch1, SZ_W); | 2080 mov_rdispr(code, src_op->base, src_op->disp, opts->gen.scratch1, SZ_W); |
2083 } | 2081 } |
2084 } | 2082 } |
2085 call(code, inst->op == M68K_MOVE_SR ? opts->set_sr : opts->set_ccr); | 2083 call(code, inst->op == M68K_MOVE_SR ? opts->set_sr : opts->set_ccr); |
2086 cycles(&opts->gen, 12); | 2084 cycles(&opts->gen, 12); |
2087 | |
2088 } | 2085 } |
2089 } | 2086 } |
2090 | 2087 |
2091 void translate_m68k_stop(m68k_options *opts, m68kinst *inst) | 2088 void translate_m68k_stop(m68k_options *opts, m68kinst *inst) |
2092 { | 2089 { |