comparison m68k_core_x86.c @ 605:49d9928353be

Fix a bug in ori to SR that was swapping USP and SSP inappropriately
author Michael Pavone <pavone@retrodev.com>
date Fri, 26 Dec 2014 19:38:27 -0800
parents f0061e3d2ad9
children 314373222b1a
comparison
equal deleted inserted replaced
604:39d7d463ed5b 605:49d9928353be
1894 if (inst->op == M68K_ANDI_SR) { 1894 if (inst->op == M68K_ANDI_SR) {
1895 and_irdisp(code, inst->src.params.immed >> 8, opts->gen.context_reg, offsetof(m68k_context, status), SZ_B); 1895 and_irdisp(code, inst->src.params.immed >> 8, opts->gen.context_reg, offsetof(m68k_context, status), SZ_B);
1896 } else { 1896 } else {
1897 or_irdisp(code, inst->src.params.immed >> 8, opts->gen.context_reg, offsetof(m68k_context, status), SZ_B); 1897 or_irdisp(code, inst->src.params.immed >> 8, opts->gen.context_reg, offsetof(m68k_context, status), SZ_B);
1898 } 1898 }
1899 if ((base_flag == X0) ^ (((inst->src.params.immed >> 8) & (1 << BIT_SUPERVISOR)) > 0)) { 1899 if (inst->op == M68K_ANDI_SR && !(inst->src.params.immed & (1 << (BIT_SUPERVISOR + 8)))) {
1900 //leave supervisor mode 1900 //leave supervisor mode
1901 swap_ssp_usp(opts); 1901 swap_ssp_usp(opts);
1902 } 1902 }
1903 if ((inst->op == M68K_ANDI_SR && (inst->src.params.immed & 0x700) != 0x700) 1903 if ((inst->op == M68K_ANDI_SR && (inst->src.params.immed & 0x700) != 0x700)
1904 || (inst->op == M68K_ORI_SR && inst->src.params.immed & 0x700)) { 1904 || (inst->op == M68K_ORI_SR && inst->src.params.immed & 0x700)) {