Speedup lazy-flags for NEG instruction

This commit is contained in:
Stanislav Shwartsman 2004-08-14 20:09:22 +00:00
parent 1b7b791493
commit 88a19a8594
4 changed files with 12 additions and 20 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: arith16.cc,v 1.32 2004-08-14 20:00:22 sshwarts Exp $
// $Id: arith16.cc,v 1.33 2004-08-14 20:09:22 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -646,10 +646,9 @@ BX_CPU_C::NEG_Ew(bxInstruction_c *i)
Write_RMW_virtual_word(diff_16);
}
SET_FLAGS_OSZAPC_16(op1_16, 0, diff_16, BX_INSTR_NEG16);
SET_FLAGS_OSZAPC_S1_16(op1_16, diff_16, BX_INSTR_NEG16);
}
void
BX_CPU_C::INC_Ew(bxInstruction_c *i)
{

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: arith32.cc,v 1.35 2004-08-14 20:00:23 sshwarts Exp $
// $Id: arith32.cc,v 1.36 2004-08-14 20:09:22 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -660,7 +660,7 @@ BX_CPU_C::NEG_Ed(bxInstruction_c *i)
Write_RMW_virtual_dword(diff_32);
}
SET_FLAGS_OSZAPC_32(op1_32, 0, diff_32, BX_INSTR_NEG32);
SET_FLAGS_OSZAPC_S1_32(op1_32, diff_32, BX_INSTR_NEG32);
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: arith64.cc,v 1.18 2004-08-14 20:00:23 sshwarts Exp $
// $Id: arith64.cc,v 1.19 2004-08-14 20:09:22 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -631,7 +631,7 @@ BX_CPU_C::NEG_Eq(bxInstruction_c *i)
Write_RMW_virtual_qword(diff_64);
}
SET_FLAGS_OSZAPC_64(op1_64, 0, diff_64, BX_INSTR_NEG64);
SET_FLAGS_OSZAPC_S1_64(op1_64, diff_64, BX_INSTR_NEG64);
}
void

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: arith8.cc,v 1.28 2004-08-14 20:00:23 sshwarts Exp $
// $Id: arith8.cc,v 1.29 2004-08-14 20:09:22 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -313,8 +313,7 @@ BX_CPU_C::CMP_EbGb(bxInstruction_c *i)
asmCmp8(op1_8, op2_8, flags32);
setEFlagsOSZAPC(flags32);
#else
Bit8u diff_8;
diff_8 = op1_8 - op2_8;
Bit8u diff_8 = op1_8 - op2_8;
SET_FLAGS_OSZAPC_8(op1_8, op2_8, diff_8, BX_INSTR_CMP8);
#endif
}
@ -339,8 +338,7 @@ BX_CPU_C::CMP_GbEb(bxInstruction_c *i)
asmCmp8(op1_8, op2_8, flags32);
setEFlagsOSZAPC(flags32);
#else
Bit8u diff_8;
diff_8 = op1_8 - op2_8;
Bit8u diff_8 = op1_8 - op2_8;
SET_FLAGS_OSZAPC_8(op1_8, op2_8, diff_8, BX_INSTR_CMP8);
#endif
}
@ -359,13 +357,11 @@ BX_CPU_C::CMP_ALIb(bxInstruction_c *i)
asmCmp8(op1_8, op2_8, flags32);
setEFlagsOSZAPC(flags32);
#else
Bit8u diff_8;
diff_8 = op1_8 - op2_8;
Bit8u diff_8 = op1_8 - op2_8;
SET_FLAGS_OSZAPC_8(op1_8, op2_8, diff_8, BX_INSTR_CMP8);
#endif
}
void
BX_CPU_C::XADD_EbGb(bxInstruction_c *i)
{
@ -489,13 +485,11 @@ BX_CPU_C::CMP_EbIb(bxInstruction_c *i)
asmCmp8(op1_8, op2_8, flags32);
setEFlagsOSZAPC(flags32);
#else
Bit8u diff_8;
diff_8 = op1_8 - op2_8;
Bit8u diff_8 = op1_8 - op2_8;
SET_FLAGS_OSZAPC_8(op1_8, op2_8, diff_8, BX_INSTR_CMP8);
#endif
}
void
BX_CPU_C::NEG_Eb(bxInstruction_c *i)
{
@ -512,10 +506,9 @@ BX_CPU_C::NEG_Eb(bxInstruction_c *i)
Write_RMW_virtual_byte(diff_8);
}
SET_FLAGS_OSZAPC_8(op1_8, 0, diff_8, BX_INSTR_NEG8);
SET_FLAGS_OSZAPC_S1_8(op1_8, diff_8, BX_INSTR_NEG8);
}
void
BX_CPU_C::INC_Eb(bxInstruction_c *i)
{