diff z80_to_x86.c @ 420:9fb111b5641f

Fix access to int_enable_cycle in EI
author Mike Pavone <pavone@retrodev.com>
date Mon, 24 Jun 2013 21:32:25 -0700
parents f54af24aad1d
children 7e8e179116af
line wrap: on
line diff
--- a/z80_to_x86.c	Mon Jun 24 21:30:38 2013 -0700
+++ b/z80_to_x86.c	Mon Jun 24 21:32:25 2013 -0700
@@ -901,11 +901,11 @@
 		break;
 	case Z80_EI:
 		dst = zcycles(dst, 4);
-		dst = mov_rrdisp8(dst, ZCYCLES, CONTEXT, offsetof(z80_context, int_enable_cycle), SZ_D);
+		dst = mov_rrdisp32(dst, ZCYCLES, CONTEXT, offsetof(z80_context, int_enable_cycle), SZ_D);
 		dst = mov_irdisp8(dst, 1, CONTEXT, offsetof(z80_context, iff1), SZ_B);
 		dst = mov_irdisp8(dst, 1, CONTEXT, offsetof(z80_context, iff2), SZ_B);
 		//interrupt enable has a one-instruction latency, minimum instruction duration is 4 cycles
-		dst = add_irdisp8(dst, 4, CONTEXT, offsetof(z80_context, int_enable_cycle), SZ_D);
+		dst = add_irdisp32(dst, 4, CONTEXT, offsetof(z80_context, int_enable_cycle), SZ_D);
 		dst = call(dst, (uint8_t *)z80_do_sync);
 		break;
 	case Z80_IM: