--- np2/i386c/ia32/instructions/misc_inst.c 2003/12/22 18:00:31 1.2 +++ np2/i386c/ia32/instructions/misc_inst.c 2011/01/15 17:17:23 1.9 @@ -1,5 +1,3 @@ -/* $Id: misc_inst.c,v 1.2 2003/12/22 18:00:31 monaka Exp $ */ - /* * Copyright (c) 2002-2003 NONAKA Kimihiro * All rights reserved. @@ -12,8 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -38,15 +34,15 @@ void LEA_GwM(void) { - WORD *out; - DWORD op, dst; + UINT16 *out; + UINT32 op, dst; GET_PCBYTE(op); if (op < 0xc0) { - CPU_WORKCLOCK(3); + CPU_WORKCLOCK(2); out = reg16_b53[op]; - dst = calc_lea(op); - *out = dst; + dst = calc_ea_dst(op); + *out = (UINT16)dst; return; } EXCEPTION(UD_EXCEPTION, 0); @@ -55,14 +51,14 @@ LEA_GwM(void) void LEA_GdM(void) { - DWORD *out; - DWORD op, dst; + UINT32 *out; + UINT32 op, dst; GET_PCBYTE(op); if (op < 0xc0) { - CPU_WORKCLOCK(3); + CPU_WORKCLOCK(2); out = reg32_b53[op]; - dst = calc_lea(op); + dst = calc_ea_dst(op); *out = dst; return; } @@ -130,7 +126,7 @@ SALC(void) { CPU_WORKCLOCK(2); - CPU_AL = (CPU_FLAGL & C_FLAG) - 1; + CPU_AL = (CPU_FLAGL & C_FLAG) ? 0xff : 0; } /* undoc 286 */ @@ -166,20 +162,18 @@ AddrSize(void) void _2byte_ESC16(void) { - DWORD op; + UINT32 op; GET_PCBYTE(op); - PROFILE_INC_INST_2BYTE(op); (*insttable_2byte[0][op])(); } void _2byte_ESC32(void) { - DWORD op; + UINT32 op; GET_PCBYTE(op); - PROFILE_INC_INST_2BYTE(op); (*insttable_2byte[1][op])(); }