--- np2/i386c/ia32/groups.c 2003/12/08 00:55:31 1.1 +++ np2/i386c/ia32/groups.c 2004/01/15 15:50:33 1.4 @@ -1,4 +1,4 @@ -/* $Id: groups.c,v 1.1 2003/12/08 00:55:31 yui Exp $ */ +/* $Id: groups.c,v 1.4 2004/01/15 15:50:33 monaka Exp $ */ /* * Copyright (c) 2002-2003 NONAKA Kimihiro @@ -38,17 +38,22 @@ void Grp1_EbIb(void) { - DWORD op; + BYTE *out; + DWORD op, madr, src; int idx; GET_PCBYTE(op); idx = (op >> 3) & 7; if (op >= 0xc0) { CPU_WORKCLOCK(3); - (*insttable_G1EbIb[idx])(reg8_b20[op]); + out = reg8_b20[op]; + GET_PCBYTE(src); + (*insttable_G1EbIb[idx])(out, src); } else { CPU_WORKCLOCK(7); - (*insttable_G1EbIb_ext[idx])(calc_ea_dst(op)); + madr = calc_ea_dst(op); + GET_PCBYTE(src); + (*insttable_G1EbIb_ext[idx])(madr, src); } } @@ -282,13 +287,15 @@ Grp2_EbCL(void) CPU_WORKCLOCK(5); out = reg8_b20[op]; cl = CPU_CL; - CPU_WORKCLOCK(cl & 0x1f); + cl &= 0x1f; + CPU_WORKCLOCK(cl); (*insttable_G2EbCL[idx])(out, cl); } else { CPU_WORKCLOCK(8); madr = calc_ea_dst(op); cl = CPU_CL; - CPU_WORKCLOCK(cl & 0x1f); + cl &= 0x1f; + CPU_WORKCLOCK(cl); (*insttable_G2EbCL_ext[idx])(madr, cl); } } @@ -307,13 +314,15 @@ Grp2_EwCL(void) CPU_WORKCLOCK(5); out = reg16_b20[op]; cl = CPU_CL; - CPU_WORKCLOCK(cl & 0x1f); + cl &= 0x1f; + CPU_WORKCLOCK(cl); (*insttable_G2EwCL[idx])(out, cl); } else { CPU_WORKCLOCK(8); madr = calc_ea_dst(op); cl = CPU_CL; - CPU_WORKCLOCK(cl & 0x1f); + cl &= 0x1f; + CPU_WORKCLOCK(cl); (*insttable_G2EwCL_ext[idx])(madr, cl); } } @@ -332,13 +341,15 @@ Grp2_EdCL(void) CPU_WORKCLOCK(5); out = reg32_b20[op]; cl = CPU_CL; - CPU_WORKCLOCK(cl & 0x1f); + cl &= 0x1f; + CPU_WORKCLOCK(cl); (*insttable_G2EdCL[idx])(out, cl); } else { CPU_WORKCLOCK(8); madr = calc_ea_dst(op); cl = CPU_CL; - CPU_WORKCLOCK(cl & 0x1f); + cl &= 0x1f; + CPU_WORKCLOCK(cl); (*insttable_G2EdCL_ext[idx])(madr, cl); } } @@ -348,7 +359,6 @@ Grp2_EdCL(void) void Grp3_Eb(void) { - DWORD op; GET_PCBYTE(op); @@ -358,7 +368,6 @@ Grp3_Eb(void) void Grp3_Ew(void) { - DWORD op; GET_PCBYTE(op); @@ -368,7 +377,6 @@ Grp3_Ew(void) void Grp3_Ed(void) { - DWORD op; GET_PCBYTE(op); @@ -409,41 +417,23 @@ Grp5_Ed(void) /* group 6 */ void -Grp6_16(void) +Grp6(void) { DWORD op; GET_PCBYTE(op); - (*insttable_G6_16[(op >> 3) & 7])(op); -} - -void -Grp6_32(void) -{ - DWORD op; - - GET_PCBYTE(op); - (*insttable_G6_32[(op >> 3) & 7])(op); + (*insttable_G6[(op >> 3) & 7])(op); } /* group 7 */ void -Grp7_16(void) -{ - DWORD op; - - GET_PCBYTE(op); - (*insttable_G7_16[(op >> 3) & 7])(op); -} - -void -Grp7_32(void) +Grp7(void) { DWORD op; GET_PCBYTE(op); - (*insttable_G7_32[(op >> 3) & 7])(op); + (*insttable_G7[(op >> 3) & 7])(op); }