--- np2/i386c/ia32/cpu.c 2004/06/17 14:38:38 1.19 +++ np2/i386c/ia32/cpu.c 2005/02/04 05:32:24 1.21 @@ -1,4 +1,4 @@ -/* $Id: cpu.c,v 1.19 2004/06/17 14:38:38 monaka Exp $ */ +/* $Id: cpu.c,v 1.21 2005/02/04 05:32:24 yui Exp $ */ /* * Copyright (c) 2002-2003 NONAKA Kimihiro @@ -100,9 +100,11 @@ exec_1step(void) CPU_STATSAVE.cpu_inst = CPU_STATSAVE.cpu_inst_default; #if defined(TRACE) && IPTRACE +if (CPU_CS == 0x000c) { trcs[trpos & (IPTRACE - 1)] = CPU_CS; treip[trpos & (IPTRACE - 1)] = CPU_EIP; trpos++; +} #endif #if defined(IA32_INSTRUCTION_TRACE) @@ -218,7 +220,7 @@ exec_1step(void) /* repe */ for (;;) { (*insttable_1byte[CPU_INST_OP32][op])(); - if (--CPU_CX == 0 || !(CPU_FLAGL & Z_FLAG)) + if (--CPU_CX == 0 || CC_NZ) break; if (CPU_REMCLOCK <= 0) { CPU_EIP = CPU_PREV_EIP; @@ -229,7 +231,7 @@ exec_1step(void) /* repne */ for (;;) { (*insttable_1byte[CPU_INST_OP32][op])(); - if (--CPU_CX == 0 || (CPU_FLAGL & Z_FLAG)) + if (--CPU_CX == 0 || CC_Z) break; if (CPU_REMCLOCK <= 0) { CPU_EIP = CPU_PREV_EIP; @@ -255,7 +257,7 @@ exec_1step(void) /* repe */ for (;;) { (*insttable_1byte[CPU_INST_OP32][op])(); - if (--CPU_ECX == 0 || !(CPU_FLAGL & Z_FLAG)) + if (--CPU_ECX == 0 || CC_NZ) break; if (CPU_REMCLOCK <= 0) { CPU_EIP = CPU_PREV_EIP; @@ -266,7 +268,7 @@ exec_1step(void) /* repne */ for (;;) { (*insttable_1byte[CPU_INST_OP32][op])(); - if (--CPU_ECX == 0 || (CPU_FLAGL & Z_FLAG)) + if (--CPU_ECX == 0 || CC_Z) break; if (CPU_REMCLOCK <= 0) { CPU_EIP = CPU_PREV_EIP;