fixed CF/OF flags

This commit is contained in:
Stanislav Shwartsman 2009-10-24 17:23:19 +00:00
parent d1a0303d43
commit 4dd73f2ebe

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: mult64.cc,v 1.34 2009-01-16 18:18:58 sshwarts Exp $
// $Id: mult64.cc,v 1.35 2009-10-24 17:23:19 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -254,8 +254,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::IMUL_RAXEqR(bxInstruction_c *i)
*/
SET_FLAGS_OSZAPC_LOGIC_64(product_128.lo);
if (((Bit64s)(product_128.lo) >= 0 && product_128.hi == 0) ||
((Bit64s)(product_128.lo) < 0 && product_128.hi == (Bit64s) BX_CONST64(0xffffffffffffffff)))
if(!(((Bit64s)(product_128.lo) >= 0 && product_128.hi == 0) ||
((Bit64s)(product_128.lo) < 0 && product_128.hi == (Bit64s) BX_CONST64(0xffffffffffffffff))))
{
ASSERT_FLAGS_OxxxxC();
}
@ -346,8 +346,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::IMUL_GqEqIdR(bxInstruction_c *i)
BX_WRITE_64BIT_REG(i->nnn(), product_128.lo);
SET_FLAGS_OSZAPC_LOGIC_64(product_128.lo);
if (((Bit64s)(product_128.lo) >= 0 && product_128.hi == 0) ||
((Bit64s)(product_128.lo) < 0 && product_128.hi == (Bit64s) BX_CONST64(0xffffffffffffffff)))
if(!(((Bit64s)(product_128.lo) >= 0 && product_128.hi == 0) ||
((Bit64s)(product_128.lo) < 0 && product_128.hi == (Bit64s) BX_CONST64(0xffffffffffffffff))))
{
ASSERT_FLAGS_OxxxxC();
}
@ -366,8 +366,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::IMUL_GqEqR(bxInstruction_c *i)
BX_WRITE_64BIT_REG(i->nnn(), product_128.lo);
SET_FLAGS_OSZAPC_LOGIC_64(product_128.lo);
if (((Bit64s)(product_128.lo) >= 0 && product_128.hi == 0) ||
((Bit64s)(product_128.lo) < 0 && product_128.hi == (Bit64s) BX_CONST64(0xffffffffffffffff)))
if(!(((Bit64s)(product_128.lo) >= 0 && product_128.hi == 0) ||
((Bit64s)(product_128.lo) < 0 && product_128.hi == (Bit64s) BX_CONST64(0xffffffffffffffff))))
{
ASSERT_FLAGS_OxxxxC();
}