comparison 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
comparison
equal deleted inserted replaced
419:d1bf9734ce94 420:9fb111b5641f
899 dst = mov_rdisp8r(dst, CONTEXT, offsetof(z80_context, sync_cycle), ZLIMIT, SZ_D); 899 dst = mov_rdisp8r(dst, CONTEXT, offsetof(z80_context, sync_cycle), ZLIMIT, SZ_D);
900 dst = mov_irdisp8(dst, 0xFFFFFFFF, CONTEXT, offsetof(z80_context, int_cycle), SZ_D); 900 dst = mov_irdisp8(dst, 0xFFFFFFFF, CONTEXT, offsetof(z80_context, int_cycle), SZ_D);
901 break; 901 break;
902 case Z80_EI: 902 case Z80_EI:
903 dst = zcycles(dst, 4); 903 dst = zcycles(dst, 4);
904 dst = mov_rrdisp8(dst, ZCYCLES, CONTEXT, offsetof(z80_context, int_enable_cycle), SZ_D); 904 dst = mov_rrdisp32(dst, ZCYCLES, CONTEXT, offsetof(z80_context, int_enable_cycle), SZ_D);
905 dst = mov_irdisp8(dst, 1, CONTEXT, offsetof(z80_context, iff1), SZ_B); 905 dst = mov_irdisp8(dst, 1, CONTEXT, offsetof(z80_context, iff1), SZ_B);
906 dst = mov_irdisp8(dst, 1, CONTEXT, offsetof(z80_context, iff2), SZ_B); 906 dst = mov_irdisp8(dst, 1, CONTEXT, offsetof(z80_context, iff2), SZ_B);
907 //interrupt enable has a one-instruction latency, minimum instruction duration is 4 cycles 907 //interrupt enable has a one-instruction latency, minimum instruction duration is 4 cycles
908 dst = add_irdisp8(dst, 4, CONTEXT, offsetof(z80_context, int_enable_cycle), SZ_D); 908 dst = add_irdisp32(dst, 4, CONTEXT, offsetof(z80_context, int_enable_cycle), SZ_D);
909 dst = call(dst, (uint8_t *)z80_do_sync); 909 dst = call(dst, (uint8_t *)z80_do_sync);
910 break; 910 break;
911 case Z80_IM: 911 case Z80_IM:
912 dst = zcycles(dst, 4); 912 dst = zcycles(dst, 4);
913 dst = mov_irdisp8(dst, inst->immed, CONTEXT, offsetof(z80_context, im), SZ_B); 913 dst = mov_irdisp8(dst, inst->immed, CONTEXT, offsetof(z80_context, im), SZ_B);