diff m68k_to_x86.c @ 321:146c87616b05

Don't update interrupt mask on non-interrupt exceptions
author Mike Pavone <pavone@retrodev.com>
date Sat, 11 May 2013 21:19:31 -0700
parents 0bcab0475a7f
children 4f2711899866
line wrap: on
line diff
--- a/m68k_to_x86.c	Sat May 11 01:57:41 2013 -0700
+++ b/m68k_to_x86.c	Sat May 11 21:19:31 2013 -0700
@@ -46,6 +46,7 @@
 void bcd_add();
 void bcd_sub();
 void m68k_start_context(uint8_t * addr, m68k_context * context);
+void debug_print_sr();
 
 uint8_t * cycles(uint8_t * dst, uint32_t num)
 {
@@ -2927,6 +2928,7 @@
 				dst = mov_rdisp8r(dst, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, opts->aregs[7], SZ_B);
 				dst = mov_rrdisp8(dst, SCRATCH1, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, SZ_B);
 			}
+			//dst = call(dst, (uint8_t *)debug_print_sr);
 			if (inst->src.params.immed & 0x700) {
 				dst = call(dst, (uint8_t *)do_sync);
 			}
@@ -3224,6 +3226,7 @@
 		}
 		if (inst->op == M68K_ORI_SR) {
 			dst = xor_irdisp8(dst, inst->src.params.immed >> 8, CONTEXT, offsetof(m68k_context, status), SZ_B);
+			//dst = call(dst, (uint8_t *)debug_print_sr);
 			if (inst->src.params.immed & 0x700) {
 				dst = call(dst, (uint8_t *)do_sync);
 			}
@@ -3284,6 +3287,7 @@
 					dst = mov_rdisp8r(dst, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, opts->aregs[7], SZ_D);
 					dst = mov_rrdisp8(dst, SCRATCH1, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, SZ_D);
 				}
+				//dst = call(dst, (uint8_t *)debug_print_sr);
 				dst = call(dst, (uint8_t *)do_sync);
 			}
 			dst = cycles(dst, 12);
@@ -3472,6 +3476,7 @@
 		}
 		if (inst->op == M68K_ORI_SR) {
 			dst = or_irdisp8(dst, inst->src.params.immed >> 8, CONTEXT, offsetof(m68k_context, status), SZ_B);
+			//dst = call(dst, (uint8_t *)debug_print_sr);
 			if (inst->src.params.immed & 0x700) {
 				dst = call(dst, (uint8_t *)do_sync);
 			}