diff z80_to_x86.c @ 372:5dcf7551bb36

Bunch of Z80 debugger improvements
author Mike Pavone <pavone@retrodev.com>
date Sun, 02 Jun 2013 20:14:27 -0700
parents f20562f2a570
children 91d28a868551
line wrap: on
line diff
--- a/z80_to_x86.c	Sun Jun 02 13:42:33 2013 -0700
+++ b/z80_to_x86.c	Sun Jun 02 20:14:27 2013 -0700
@@ -1995,7 +1995,10 @@
 		dst = cmp_rr(dst, ZCYCLES, ZLIMIT, SZ_D);
 		uint8_t * jmp_off = dst+1;
 		dst = jcc(dst, CC_NC, dst + 7);
-		dst = call(dst, (uint8_t *)z80_handle_cycle_limit_int);
+		dst = pop_r(dst, SCRATCH1);
+		dst = add_ir(dst, check_int_size - (native-start_native), SCRATCH1, SZ_Q);
+		dst = push_r(dst, SCRATCH1);
+		dst = jmp(dst, (uint8_t *)z80_handle_cycle_limit_int);
 		*jmp_off = dst - (jmp_off+1);
 		//jump back to body of translated instruction
 		dst = pop_r(dst, SCRATCH1);