diff options
author | Michael Pavone <pavone@retrodev.com> | 2014-12-26 19:38:27 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2014-12-26 19:38:27 -0800 |
commit | 77b305b44b0857a3e4bb6fd22ee96e4bb42323cc (patch) | |
tree | 2ab7d43fe554cbd16a8e9467cc6dce0c25e7a9de | |
parent | 21cbee7575fce46e9730bef9df4d1e7eea819793 (diff) |
Fix a bug in ori to SR that was swapping USP and SSP inappropriately
-rw-r--r-- | m68k_core_x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/m68k_core_x86.c b/m68k_core_x86.c index 96e1cfa..ef84721 100644 --- a/m68k_core_x86.c +++ b/m68k_core_x86.c @@ -1896,7 +1896,7 @@ void translate_m68k_andi_ori_ccr_sr(m68k_options *opts, m68kinst *inst) } else { or_irdisp(code, inst->src.params.immed >> 8, opts->gen.context_reg, offsetof(m68k_context, status), SZ_B); } - if ((base_flag == X0) ^ (((inst->src.params.immed >> 8) & (1 << BIT_SUPERVISOR)) > 0)) { + if (inst->op == M68K_ANDI_SR && !(inst->src.params.immed & (1 << (BIT_SUPERVISOR + 8)))) { //leave supervisor mode swap_ssp_usp(opts); } |