move handleDAZ to fpu

This commit is contained in:
Stanislav Shwartsman 2008-04-04 20:03:27 +00:00
parent bb1195f1e6
commit 026c333fa9

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: sse_pfp.cc,v 1.42 2008-03-22 21:29:41 sshwarts Exp $
// $Id: sse_pfp.cc,v 1.43 2008-04-04 20:03:27 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2003 Stanislav Shwartsman
@ -54,19 +54,6 @@ static void mxcsr_to_softfloat_status_word(float_status_t &status, bx_mxcsr_t mx
(mxcsr.get_flush_masked_underflow() && mxcsr.get_UM()) ? 1 : 0;
}
// handle DAZ
BX_CPP_INLINE float32 handleDAZ(float32 op)
{
if (float32_class(op) == float_denormal) op &= ((Bit32u)(1) << 31);
return op;
}
BX_CPP_INLINE float64 handleDAZ(float64 op)
{
if (float64_class(op) == float_denormal) op &= ((Bit64u)(1) << 63);
return op;
}
/* Comparison predicate for CMPSS/CMPPS instructions */
static float32_compare_method compare32[4] = {
float32_eq,
@ -309,8 +296,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTTPS2PI_PqWps(bxInstruction_c *i)
float32 r1 = (float32)(op >> 32);
if (MXCSR.get_DAZ()) {
r0 = handleDAZ(r0);
r1 = handleDAZ(r1);
r0 = float32_denormal_to_zero(r0);
r1 = float32_denormal_to_zero(r1);
}
MMXUD0(result) = float32_to_int32_round_to_zero(r0, status_word);
@ -353,8 +340,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTTPD2PI_PqWpd(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op.xmm64u(0) = handleDAZ(op.xmm64u(0));
op.xmm64u(1) = handleDAZ(op.xmm64u(1));
op.xmm64u(0) = float64_denormal_to_zero(op.xmm64u(0));
op.xmm64u(1) = float64_denormal_to_zero(op.xmm64u(1));
}
MMXUD0(result) = float64_to_int32_round_to_zero(op.xmm64u(0), status_word);
@ -394,7 +381,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTTSD2SI_GdWsd(bxInstruction_c *i)
float_status_t status_word;
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) op = handleDAZ(op);
if (MXCSR.get_DAZ()) op = float64_denormal_to_zero(op);
#if BX_SUPPORT_X86_64
if (i->os64L()) /* 64 bit operand size mode */
@ -443,7 +430,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTTSS2SI_GdWss(bxInstruction_c *i)
float_status_t status_word;
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) op = handleDAZ(op);
if (MXCSR.get_DAZ()) op = float32_denormal_to_zero(op);
#if BX_SUPPORT_X86_64
if (i->os64L()) /* 64 bit operand size mode */
@ -499,8 +486,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTPS2PI_PqWps(bxInstruction_c *i)
float32 r1 = (float32)(op >> 32);
if (MXCSR.get_DAZ()) {
r0 = handleDAZ(r0);
r1 = handleDAZ(r1);
r0 = float32_denormal_to_zero(r0);
r1 = float32_denormal_to_zero(r1);
}
MMXUD0(result) = float32_to_int32(r0, status_word);
@ -544,8 +531,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTPD2PI_PqWpd(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op.xmm64u(0) = handleDAZ(op.xmm64u(0));
op.xmm64u(1) = handleDAZ(op.xmm64u(1));
op.xmm64u(0) = float64_denormal_to_zero(op.xmm64u(0));
op.xmm64u(1) = float64_denormal_to_zero(op.xmm64u(1));
}
MMXUD0(result) = float64_to_int32(op.xmm64u(0), status_word);
@ -585,7 +572,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTSD2SI_GdWsd(bxInstruction_c *i)
float_status_t status_word;
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) op = handleDAZ(op);
if (MXCSR.get_DAZ()) op = float64_denormal_to_zero(op);
#if BX_SUPPORT_X86_64
if (i->os64L()) /* 64 bit operand size mode */
@ -634,7 +621,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTSS2SI_GdWss(bxInstruction_c *i)
float_status_t status_word;
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) op = handleDAZ(op);
if (MXCSR.get_DAZ()) op = float32_denormal_to_zero(op);
#if BX_SUPPORT_X86_64
if (i->os64L()) /* 64 bit operand size mode */
@ -687,8 +674,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTPS2PD_VpsWps(bxInstruction_c *i)
float32 r1 = (float32)(op >> 32);
if (MXCSR.get_DAZ()) {
r0 = handleDAZ(r0);
r1 = handleDAZ(r1);
r0 = float32_denormal_to_zero(r0);
r1 = float32_denormal_to_zero(r1);
}
result.xmm64u(0) = float32_to_float64(r0, status_word);
@ -732,8 +719,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTPD2PS_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op.xmm64u(0) = handleDAZ(op.xmm64u(0));
op.xmm64u(1) = handleDAZ(op.xmm64u(1));
op.xmm64u(0) = float64_denormal_to_zero(op.xmm64u(0));
op.xmm64u(1) = float64_denormal_to_zero(op.xmm64u(1));
}
result.xmm32u(0) = float64_to_float32(op.xmm64u(0), status_word);
@ -776,7 +763,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTSD2SS_VsdWsd(bxInstruction_c *i)
float_status_t status_word;
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) op = handleDAZ(op);
if (MXCSR.get_DAZ()) op = float64_denormal_to_zero(op);
result = float64_to_float32(op, status_word);
BX_CPU_THIS_PTR check_exceptionsSSE(status_word.float_exception_flags);
BX_WRITE_XMM_REG_LO_DWORD(i->nnn(), result);
@ -812,7 +799,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTSS2SD_VssWss(bxInstruction_c *i)
float_status_t status_word;
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) op = handleDAZ(op);
if (MXCSR.get_DAZ()) op = float32_denormal_to_zero(op);
result = float32_to_float64(op, status_word);
BX_CPU_THIS_PTR check_exceptionsSSE(status_word.float_exception_flags);
BX_WRITE_XMM_REG_LO_QWORD(i->nnn(), result);
@ -891,10 +878,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTPS2DQ_VdqWps(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op.xmm32u(0) = handleDAZ(op.xmm32u(0));
op.xmm32u(1) = handleDAZ(op.xmm32u(1));
op.xmm32u(2) = handleDAZ(op.xmm32u(2));
op.xmm32u(3) = handleDAZ(op.xmm32u(3));
op.xmm32u(0) = float32_denormal_to_zero(op.xmm32u(0));
op.xmm32u(1) = float32_denormal_to_zero(op.xmm32u(1));
op.xmm32u(2) = float32_denormal_to_zero(op.xmm32u(2));
op.xmm32u(3) = float32_denormal_to_zero(op.xmm32u(3));
}
op.xmm32u(0) = float32_to_int32(op.xmm32u(0), status_word);
@ -937,10 +924,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTTPS2DQ_VdqWps(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op.xmm32u(0) = handleDAZ(op.xmm32u(0));
op.xmm32u(1) = handleDAZ(op.xmm32u(1));
op.xmm32u(2) = handleDAZ(op.xmm32u(2));
op.xmm32u(3) = handleDAZ(op.xmm32u(3));
op.xmm32u(0) = float32_denormal_to_zero(op.xmm32u(0));
op.xmm32u(1) = float32_denormal_to_zero(op.xmm32u(1));
op.xmm32u(2) = float32_denormal_to_zero(op.xmm32u(2));
op.xmm32u(3) = float32_denormal_to_zero(op.xmm32u(3));
}
op.xmm32u(0) = float32_to_int32_round_to_zero(op.xmm32u(0), status_word);
@ -983,8 +970,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTTPD2DQ_VqWpd(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op.xmm64u(0) = handleDAZ(op.xmm64u(0));
op.xmm64u(1) = handleDAZ(op.xmm64u(1));
op.xmm64u(0) = float64_denormal_to_zero(op.xmm64u(0));
op.xmm64u(1) = float64_denormal_to_zero(op.xmm64u(1));
}
result.xmm32u(0) = float64_to_int32_round_to_zero(op.xmm64u(0), status_word);
@ -1027,8 +1014,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CVTPD2DQ_VqWpd(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op.xmm64u(0) = handleDAZ(op.xmm64u(0));
op.xmm64u(1) = handleDAZ(op.xmm64u(1));
op.xmm64u(0) = float64_denormal_to_zero(op.xmm64u(0));
op.xmm64u(1) = float64_denormal_to_zero(op.xmm64u(1));
}
result.xmm32u(0) = float64_to_int32(op.xmm64u(0), status_word);
@ -1106,8 +1093,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::UCOMISS_VssWss(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float32_denormal_to_zero(op1);
op2 = float32_denormal_to_zero(op2);
}
int rc = float32_compare_quiet(op1, op2, status_word);
@ -1146,8 +1133,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::UCOMISD_VsdWsd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float64_denormal_to_zero(op1);
op2 = float64_denormal_to_zero(op2);
}
int rc = float64_compare_quiet(op1, op2, status_word);
@ -1186,8 +1173,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::COMISS_VpsWps(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float32_denormal_to_zero(op1);
op2 = float32_denormal_to_zero(op2);
}
int rc = float32_compare(op1, op2, status_word);
@ -1226,8 +1213,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::COMISD_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float64_denormal_to_zero(op1);
op2 = float64_denormal_to_zero(op2);
}
int rc = float64_compare(op1, op2, status_word);
@ -1266,10 +1253,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::SQRTPS_VpsWps(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op.xmm32u(0) = handleDAZ(op.xmm32u(0));
op.xmm32u(1) = handleDAZ(op.xmm32u(1));
op.xmm32u(2) = handleDAZ(op.xmm32u(2));
op.xmm32u(3) = handleDAZ(op.xmm32u(3));
op.xmm32u(0) = float32_denormal_to_zero(op.xmm32u(0));
op.xmm32u(1) = float32_denormal_to_zero(op.xmm32u(1));
op.xmm32u(2) = float32_denormal_to_zero(op.xmm32u(2));
op.xmm32u(3) = float32_denormal_to_zero(op.xmm32u(3));
}
op.xmm32u(0) = float32_sqrt(op.xmm32u(0), status_word);
@ -1313,8 +1300,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::SQRTPD_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op.xmm64u(0) = handleDAZ(op.xmm64u(0));
op.xmm64u(1) = handleDAZ(op.xmm64u(1));
op.xmm64u(0) = float64_denormal_to_zero(op.xmm64u(0));
op.xmm64u(1) = float64_denormal_to_zero(op.xmm64u(1));
}
op.xmm64u(0) = float64_sqrt(op.xmm64u(0), status_word);
@ -1353,7 +1340,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::SQRTSD_VsdWsd(bxInstruction_c *i)
float_status_t status_word;
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) op = handleDAZ(op);
if (MXCSR.get_DAZ()) op = float64_denormal_to_zero(op);
op = float64_sqrt(op, status_word);
BX_CPU_THIS_PTR check_exceptionsSSE(status_word.float_exception_flags);
BX_WRITE_XMM_REG_LO_QWORD(i->nnn(), op);
@ -1388,7 +1375,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::SQRTSS_VssWss(bxInstruction_c *i)
float_status_t status_word;
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) op = handleDAZ(op);
if (MXCSR.get_DAZ()) op = float32_denormal_to_zero(op);
op = float32_sqrt(op, status_word);
BX_CPU_THIS_PTR check_exceptionsSSE(status_word.float_exception_flags);
BX_WRITE_XMM_REG_LO_DWORD(i->nnn(), op);
@ -1425,15 +1412,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::ADDPS_VpsWps(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op1.xmm32u(0) = handleDAZ(op1.xmm32u(0));
op1.xmm32u(1) = handleDAZ(op1.xmm32u(1));
op1.xmm32u(2) = handleDAZ(op1.xmm32u(2));
op1.xmm32u(3) = handleDAZ(op1.xmm32u(3));
op1.xmm32u(0) = float32_denormal_to_zero(op1.xmm32u(0));
op1.xmm32u(1) = float32_denormal_to_zero(op1.xmm32u(1));
op1.xmm32u(2) = float32_denormal_to_zero(op1.xmm32u(2));
op1.xmm32u(3) = float32_denormal_to_zero(op1.xmm32u(3));
op2.xmm32u(0) = handleDAZ(op2.xmm32u(0));
op2.xmm32u(1) = handleDAZ(op2.xmm32u(1));
op2.xmm32u(2) = handleDAZ(op2.xmm32u(2));
op2.xmm32u(3) = handleDAZ(op2.xmm32u(3));
op2.xmm32u(0) = float32_denormal_to_zero(op2.xmm32u(0));
op2.xmm32u(1) = float32_denormal_to_zero(op2.xmm32u(1));
op2.xmm32u(2) = float32_denormal_to_zero(op2.xmm32u(2));
op2.xmm32u(3) = float32_denormal_to_zero(op2.xmm32u(3));
}
op1.xmm32u(0) = float32_add(op1.xmm32u(0), op2.xmm32u(0), status_word);
@ -1477,10 +1464,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::ADDPD_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1.xmm64u(0) = handleDAZ(op1.xmm64u(0));
op1.xmm64u(1) = handleDAZ(op1.xmm64u(1));
op2.xmm64u(0) = handleDAZ(op2.xmm64u(0));
op2.xmm64u(1) = handleDAZ(op2.xmm64u(1));
op1.xmm64u(0) = float64_denormal_to_zero(op1.xmm64u(0));
op1.xmm64u(1) = float64_denormal_to_zero(op1.xmm64u(1));
op2.xmm64u(0) = float64_denormal_to_zero(op2.xmm64u(0));
op2.xmm64u(1) = float64_denormal_to_zero(op2.xmm64u(1));
}
op1.xmm64u(0) = float64_add(op1.xmm64u(0), op2.xmm64u(0), status_word);
@ -1522,8 +1509,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::ADDSD_VsdWsd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float64_denormal_to_zero(op1);
op2 = float64_denormal_to_zero(op2);
}
op1 = float64_add(op1, op2, status_word);
@ -1563,8 +1550,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::ADDSS_VssWss(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float32_denormal_to_zero(op1);
op2 = float32_denormal_to_zero(op2);
}
op1 = float32_add(op1, op2, status_word);
@ -1603,15 +1590,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MULPS_VpsWps(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op1.xmm32u(0) = handleDAZ(op1.xmm32u(0));
op1.xmm32u(1) = handleDAZ(op1.xmm32u(1));
op1.xmm32u(2) = handleDAZ(op1.xmm32u(2));
op1.xmm32u(3) = handleDAZ(op1.xmm32u(3));
op1.xmm32u(0) = float32_denormal_to_zero(op1.xmm32u(0));
op1.xmm32u(1) = float32_denormal_to_zero(op1.xmm32u(1));
op1.xmm32u(2) = float32_denormal_to_zero(op1.xmm32u(2));
op1.xmm32u(3) = float32_denormal_to_zero(op1.xmm32u(3));
op2.xmm32u(0) = handleDAZ(op2.xmm32u(0));
op2.xmm32u(1) = handleDAZ(op2.xmm32u(1));
op2.xmm32u(2) = handleDAZ(op2.xmm32u(2));
op2.xmm32u(3) = handleDAZ(op2.xmm32u(3));
op2.xmm32u(0) = float32_denormal_to_zero(op2.xmm32u(0));
op2.xmm32u(1) = float32_denormal_to_zero(op2.xmm32u(1));
op2.xmm32u(2) = float32_denormal_to_zero(op2.xmm32u(2));
op2.xmm32u(3) = float32_denormal_to_zero(op2.xmm32u(3));
}
op1.xmm32u(0) = float32_mul(op1.xmm32u(0), op2.xmm32u(0), status_word);
@ -1655,10 +1642,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MULPD_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1.xmm64u(0) = handleDAZ(op1.xmm64u(0));
op1.xmm64u(1) = handleDAZ(op1.xmm64u(1));
op2.xmm64u(0) = handleDAZ(op2.xmm64u(0));
op2.xmm64u(1) = handleDAZ(op2.xmm64u(1));
op1.xmm64u(0) = float64_denormal_to_zero(op1.xmm64u(0));
op1.xmm64u(1) = float64_denormal_to_zero(op1.xmm64u(1));
op2.xmm64u(0) = float64_denormal_to_zero(op2.xmm64u(0));
op2.xmm64u(1) = float64_denormal_to_zero(op2.xmm64u(1));
}
op1.xmm64u(0) = float64_mul(op1.xmm64u(0), op2.xmm64u(0), status_word);
@ -1700,8 +1687,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MULSD_VsdWsd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float64_denormal_to_zero(op1);
op2 = float64_denormal_to_zero(op2);
}
op1 = float64_mul(op1, op2, status_word);
@ -1741,8 +1728,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MULSS_VssWss(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float32_denormal_to_zero(op1);
op2 = float32_denormal_to_zero(op2);
}
op1 = float32_mul(op1, op2, status_word);
@ -1781,15 +1768,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::SUBPS_VpsWps(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op1.xmm32u(0) = handleDAZ(op1.xmm32u(0));
op1.xmm32u(1) = handleDAZ(op1.xmm32u(1));
op1.xmm32u(2) = handleDAZ(op1.xmm32u(2));
op1.xmm32u(3) = handleDAZ(op1.xmm32u(3));
op1.xmm32u(0) = float32_denormal_to_zero(op1.xmm32u(0));
op1.xmm32u(1) = float32_denormal_to_zero(op1.xmm32u(1));
op1.xmm32u(2) = float32_denormal_to_zero(op1.xmm32u(2));
op1.xmm32u(3) = float32_denormal_to_zero(op1.xmm32u(3));
op2.xmm32u(0) = handleDAZ(op2.xmm32u(0));
op2.xmm32u(1) = handleDAZ(op2.xmm32u(1));
op2.xmm32u(2) = handleDAZ(op2.xmm32u(2));
op2.xmm32u(3) = handleDAZ(op2.xmm32u(3));
op2.xmm32u(0) = float32_denormal_to_zero(op2.xmm32u(0));
op2.xmm32u(1) = float32_denormal_to_zero(op2.xmm32u(1));
op2.xmm32u(2) = float32_denormal_to_zero(op2.xmm32u(2));
op2.xmm32u(3) = float32_denormal_to_zero(op2.xmm32u(3));
}
op1.xmm32u(0) = float32_sub(op1.xmm32u(0), op2.xmm32u(0), status_word);
@ -1833,10 +1820,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::SUBPD_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1.xmm64u(0) = handleDAZ(op1.xmm64u(0));
op1.xmm64u(1) = handleDAZ(op1.xmm64u(1));
op2.xmm64u(0) = handleDAZ(op2.xmm64u(0));
op2.xmm64u(1) = handleDAZ(op2.xmm64u(1));
op1.xmm64u(0) = float64_denormal_to_zero(op1.xmm64u(0));
op1.xmm64u(1) = float64_denormal_to_zero(op1.xmm64u(1));
op2.xmm64u(0) = float64_denormal_to_zero(op2.xmm64u(0));
op2.xmm64u(1) = float64_denormal_to_zero(op2.xmm64u(1));
}
op1.xmm64u(0) = float64_sub(op1.xmm64u(0), op2.xmm64u(0), status_word);
@ -1878,8 +1865,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::SUBSD_VsdWsd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float64_denormal_to_zero(op1);
op2 = float64_denormal_to_zero(op2);
}
op1 = float64_sub(op1, op2, status_word);
@ -1919,8 +1906,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::SUBSS_VssWss(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float32_denormal_to_zero(op1);
op2 = float32_denormal_to_zero(op2);
}
op1 = float32_sub(op1, op2, status_word);
@ -1960,15 +1947,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MINPS_VpsWps(bxInstruction_c *i)
int rc;
if (MXCSR.get_DAZ()) {
op1.xmm32u(0) = handleDAZ(op1.xmm32u(0));
op1.xmm32u(1) = handleDAZ(op1.xmm32u(1));
op1.xmm32u(2) = handleDAZ(op1.xmm32u(2));
op1.xmm32u(3) = handleDAZ(op1.xmm32u(3));
op1.xmm32u(0) = float32_denormal_to_zero(op1.xmm32u(0));
op1.xmm32u(1) = float32_denormal_to_zero(op1.xmm32u(1));
op1.xmm32u(2) = float32_denormal_to_zero(op1.xmm32u(2));
op1.xmm32u(3) = float32_denormal_to_zero(op1.xmm32u(3));
op2.xmm32u(0) = handleDAZ(op2.xmm32u(0));
op2.xmm32u(1) = handleDAZ(op2.xmm32u(1));
op2.xmm32u(2) = handleDAZ(op2.xmm32u(2));
op2.xmm32u(3) = handleDAZ(op2.xmm32u(3));
op2.xmm32u(0) = float32_denormal_to_zero(op2.xmm32u(0));
op2.xmm32u(1) = float32_denormal_to_zero(op2.xmm32u(1));
op2.xmm32u(2) = float32_denormal_to_zero(op2.xmm32u(2));
op2.xmm32u(3) = float32_denormal_to_zero(op2.xmm32u(3));
}
rc = float32_compare(op1.xmm32u(0), op2.xmm32u(0), status_word);
@ -2017,10 +2004,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MINPD_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1.xmm64u(0) = handleDAZ(op1.xmm64u(0));
op1.xmm64u(1) = handleDAZ(op1.xmm64u(1));
op2.xmm64u(0) = handleDAZ(op2.xmm64u(0));
op2.xmm64u(1) = handleDAZ(op2.xmm64u(1));
op1.xmm64u(0) = float64_denormal_to_zero(op1.xmm64u(0));
op1.xmm64u(1) = float64_denormal_to_zero(op1.xmm64u(1));
op2.xmm64u(0) = float64_denormal_to_zero(op2.xmm64u(0));
op2.xmm64u(1) = float64_denormal_to_zero(op2.xmm64u(1));
}
rc = float64_compare(op1.xmm64u(0), op2.xmm64u(0), status_word);
@ -2064,8 +2051,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MINSD_VsdWsd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float64_denormal_to_zero(op1);
op2 = float64_denormal_to_zero(op2);
}
int rc = float64_compare(op1, op2, status_word);
@ -2106,8 +2093,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MINSS_VssWss(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float32_denormal_to_zero(op1);
op2 = float32_denormal_to_zero(op2);
}
int rc = float32_compare(op1, op2, status_word);
@ -2147,15 +2134,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::DIVPS_VpsWps(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op1.xmm32u(0) = handleDAZ(op1.xmm32u(0));
op1.xmm32u(1) = handleDAZ(op1.xmm32u(1));
op1.xmm32u(2) = handleDAZ(op1.xmm32u(2));
op1.xmm32u(3) = handleDAZ(op1.xmm32u(3));
op1.xmm32u(0) = float32_denormal_to_zero(op1.xmm32u(0));
op1.xmm32u(1) = float32_denormal_to_zero(op1.xmm32u(1));
op1.xmm32u(2) = float32_denormal_to_zero(op1.xmm32u(2));
op1.xmm32u(3) = float32_denormal_to_zero(op1.xmm32u(3));
op2.xmm32u(0) = handleDAZ(op2.xmm32u(0));
op2.xmm32u(1) = handleDAZ(op2.xmm32u(1));
op2.xmm32u(2) = handleDAZ(op2.xmm32u(2));
op2.xmm32u(3) = handleDAZ(op2.xmm32u(3));
op2.xmm32u(0) = float32_denormal_to_zero(op2.xmm32u(0));
op2.xmm32u(1) = float32_denormal_to_zero(op2.xmm32u(1));
op2.xmm32u(2) = float32_denormal_to_zero(op2.xmm32u(2));
op2.xmm32u(3) = float32_denormal_to_zero(op2.xmm32u(3));
}
op1.xmm32u(0) = float32_div(op1.xmm32u(0), op2.xmm32u(0), status_word);
@ -2199,10 +2186,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::DIVPD_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1.xmm64u(0) = handleDAZ(op1.xmm64u(0));
op1.xmm64u(1) = handleDAZ(op1.xmm64u(1));
op2.xmm64u(0) = handleDAZ(op2.xmm64u(0));
op2.xmm64u(1) = handleDAZ(op2.xmm64u(1));
op1.xmm64u(0) = float64_denormal_to_zero(op1.xmm64u(0));
op1.xmm64u(1) = float64_denormal_to_zero(op1.xmm64u(1));
op2.xmm64u(0) = float64_denormal_to_zero(op2.xmm64u(0));
op2.xmm64u(1) = float64_denormal_to_zero(op2.xmm64u(1));
}
op1.xmm64u(0) = float64_div(op1.xmm64u(0), op2.xmm64u(0), status_word);
@ -2244,8 +2231,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::DIVSD_VsdWsd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float64_denormal_to_zero(op1);
op2 = float64_denormal_to_zero(op2);
}
op1 = float64_div(op1, op2, status_word);
@ -2285,8 +2272,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::DIVSS_VssWss(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float32_denormal_to_zero(op1);
op2 = float32_denormal_to_zero(op2);
}
op1 = float32_div(op1, op2, status_word);
@ -2326,15 +2313,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MAXPS_VpsWps(bxInstruction_c *i)
int rc;
if (MXCSR.get_DAZ()) {
op1.xmm32u(0) = handleDAZ(op1.xmm32u(0));
op1.xmm32u(1) = handleDAZ(op1.xmm32u(1));
op1.xmm32u(2) = handleDAZ(op1.xmm32u(2));
op1.xmm32u(3) = handleDAZ(op1.xmm32u(3));
op1.xmm32u(0) = float32_denormal_to_zero(op1.xmm32u(0));
op1.xmm32u(1) = float32_denormal_to_zero(op1.xmm32u(1));
op1.xmm32u(2) = float32_denormal_to_zero(op1.xmm32u(2));
op1.xmm32u(3) = float32_denormal_to_zero(op1.xmm32u(3));
op2.xmm32u(0) = handleDAZ(op2.xmm32u(0));
op2.xmm32u(1) = handleDAZ(op2.xmm32u(1));
op2.xmm32u(2) = handleDAZ(op2.xmm32u(2));
op2.xmm32u(3) = handleDAZ(op2.xmm32u(3));
op2.xmm32u(0) = float32_denormal_to_zero(op2.xmm32u(0));
op2.xmm32u(1) = float32_denormal_to_zero(op2.xmm32u(1));
op2.xmm32u(2) = float32_denormal_to_zero(op2.xmm32u(2));
op2.xmm32u(3) = float32_denormal_to_zero(op2.xmm32u(3));
}
rc = float32_compare(op1.xmm32u(0), op2.xmm32u(0), status_word);
@ -2383,10 +2370,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MAXPD_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1.xmm64u(0) = handleDAZ(op1.xmm64u(0));
op1.xmm64u(1) = handleDAZ(op1.xmm64u(1));
op2.xmm64u(0) = handleDAZ(op2.xmm64u(0));
op2.xmm64u(1) = handleDAZ(op2.xmm64u(1));
op1.xmm64u(0) = float64_denormal_to_zero(op1.xmm64u(0));
op1.xmm64u(1) = float64_denormal_to_zero(op1.xmm64u(1));
op2.xmm64u(0) = float64_denormal_to_zero(op2.xmm64u(0));
op2.xmm64u(1) = float64_denormal_to_zero(op2.xmm64u(1));
}
rc = float64_compare(op1.xmm64u(0), op2.xmm64u(0), status_word);
@ -2430,8 +2417,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MAXSD_VsdWsd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float64_denormal_to_zero(op1);
op2 = float64_denormal_to_zero(op2);
}
int rc = float64_compare(op1, op2, status_word);
@ -2472,8 +2459,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MAXSS_VssWss(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float32_denormal_to_zero(op1);
op2 = float32_denormal_to_zero(op2);
}
int rc = float32_compare(op1, op2, status_word);
@ -2514,10 +2501,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::HADDPD_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1.xmm64u(0) = handleDAZ(op1.xmm64u(0));
op1.xmm64u(1) = handleDAZ(op1.xmm64u(1));
op2.xmm64u(0) = handleDAZ(op2.xmm64u(0));
op2.xmm64u(1) = handleDAZ(op2.xmm64u(1));
op1.xmm64u(0) = float64_denormal_to_zero(op1.xmm64u(0));
op1.xmm64u(1) = float64_denormal_to_zero(op1.xmm64u(1));
op2.xmm64u(0) = float64_denormal_to_zero(op2.xmm64u(0));
op2.xmm64u(1) = float64_denormal_to_zero(op2.xmm64u(1));
}
result.xmm64u(0) = float64_add(op1.xmm64u(0), op1.xmm64u(1), status_word);
@ -2558,15 +2545,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::HADDPS_VpsWps(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op1.xmm32u(0) = handleDAZ(op1.xmm32u(0));
op1.xmm32u(1) = handleDAZ(op1.xmm32u(1));
op1.xmm32u(2) = handleDAZ(op1.xmm32u(2));
op1.xmm32u(3) = handleDAZ(op1.xmm32u(3));
op1.xmm32u(0) = float32_denormal_to_zero(op1.xmm32u(0));
op1.xmm32u(1) = float32_denormal_to_zero(op1.xmm32u(1));
op1.xmm32u(2) = float32_denormal_to_zero(op1.xmm32u(2));
op1.xmm32u(3) = float32_denormal_to_zero(op1.xmm32u(3));
op2.xmm32u(0) = handleDAZ(op2.xmm32u(0));
op2.xmm32u(1) = handleDAZ(op2.xmm32u(1));
op2.xmm32u(2) = handleDAZ(op2.xmm32u(2));
op2.xmm32u(3) = handleDAZ(op2.xmm32u(3));
op2.xmm32u(0) = float32_denormal_to_zero(op2.xmm32u(0));
op2.xmm32u(1) = float32_denormal_to_zero(op2.xmm32u(1));
op2.xmm32u(2) = float32_denormal_to_zero(op2.xmm32u(2));
op2.xmm32u(3) = float32_denormal_to_zero(op2.xmm32u(3));
}
result.xmm32u(0) = float32_add(op1.xmm32u(0), op1.xmm32u(1), status_word);
@ -2610,10 +2597,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::HSUBPD_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1.xmm64u(0) = handleDAZ(op1.xmm64u(0));
op1.xmm64u(1) = handleDAZ(op1.xmm64u(1));
op2.xmm64u(0) = handleDAZ(op2.xmm64u(0));
op2.xmm64u(1) = handleDAZ(op2.xmm64u(1));
op1.xmm64u(0) = float64_denormal_to_zero(op1.xmm64u(0));
op1.xmm64u(1) = float64_denormal_to_zero(op1.xmm64u(1));
op2.xmm64u(0) = float64_denormal_to_zero(op2.xmm64u(0));
op2.xmm64u(1) = float64_denormal_to_zero(op2.xmm64u(1));
}
result.xmm64u(0) = float64_sub(op1.xmm64u(0), op1.xmm64u(1), status_word);
@ -2654,15 +2641,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::HSUBPS_VpsWps(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op1.xmm32u(0) = handleDAZ(op1.xmm32u(0));
op1.xmm32u(1) = handleDAZ(op1.xmm32u(1));
op1.xmm32u(2) = handleDAZ(op1.xmm32u(2));
op1.xmm32u(3) = handleDAZ(op1.xmm32u(3));
op1.xmm32u(0) = float32_denormal_to_zero(op1.xmm32u(0));
op1.xmm32u(1) = float32_denormal_to_zero(op1.xmm32u(1));
op1.xmm32u(2) = float32_denormal_to_zero(op1.xmm32u(2));
op1.xmm32u(3) = float32_denormal_to_zero(op1.xmm32u(3));
op2.xmm32u(0) = handleDAZ(op2.xmm32u(0));
op2.xmm32u(1) = handleDAZ(op2.xmm32u(1));
op2.xmm32u(2) = handleDAZ(op2.xmm32u(2));
op2.xmm32u(3) = handleDAZ(op2.xmm32u(3));
op2.xmm32u(0) = float32_denormal_to_zero(op2.xmm32u(0));
op2.xmm32u(1) = float32_denormal_to_zero(op2.xmm32u(1));
op2.xmm32u(2) = float32_denormal_to_zero(op2.xmm32u(2));
op2.xmm32u(3) = float32_denormal_to_zero(op2.xmm32u(3));
}
result.xmm32u(0) = float32_sub(op1.xmm32u(0), op1.xmm32u(1), status_word);
@ -2712,15 +2699,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CMPPS_VpsWpsIb(bxInstruction_c *i)
ib &= 7;
if (MXCSR.get_DAZ()) {
op1.xmm32u(0) = handleDAZ(op1.xmm32u(0));
op1.xmm32u(1) = handleDAZ(op1.xmm32u(1));
op1.xmm32u(2) = handleDAZ(op1.xmm32u(2));
op1.xmm32u(3) = handleDAZ(op1.xmm32u(3));
op1.xmm32u(0) = float32_denormal_to_zero(op1.xmm32u(0));
op1.xmm32u(1) = float32_denormal_to_zero(op1.xmm32u(1));
op1.xmm32u(2) = float32_denormal_to_zero(op1.xmm32u(2));
op1.xmm32u(3) = float32_denormal_to_zero(op1.xmm32u(3));
op2.xmm32u(0) = handleDAZ(op2.xmm32u(0));
op2.xmm32u(1) = handleDAZ(op2.xmm32u(1));
op2.xmm32u(2) = handleDAZ(op2.xmm32u(2));
op2.xmm32u(3) = handleDAZ(op2.xmm32u(3));
op2.xmm32u(0) = float32_denormal_to_zero(op2.xmm32u(0));
op2.xmm32u(1) = float32_denormal_to_zero(op2.xmm32u(1));
op2.xmm32u(2) = float32_denormal_to_zero(op2.xmm32u(2));
op2.xmm32u(3) = float32_denormal_to_zero(op2.xmm32u(3));
}
if(ib < 4)
@ -2791,10 +2778,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CMPPD_VpdWpdIb(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1.xmm64u(0) = handleDAZ(op1.xmm64u(0));
op1.xmm64u(1) = handleDAZ(op1.xmm64u(1));
op2.xmm64u(0) = handleDAZ(op2.xmm64u(0));
op2.xmm64u(1) = handleDAZ(op2.xmm64u(1));
op1.xmm64u(0) = float64_denormal_to_zero(op1.xmm64u(0));
op1.xmm64u(1) = float64_denormal_to_zero(op1.xmm64u(1));
op2.xmm64u(0) = float64_denormal_to_zero(op2.xmm64u(0));
op2.xmm64u(1) = float64_denormal_to_zero(op2.xmm64u(1));
}
if(ib < 4)
@ -2857,8 +2844,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CMPSD_VsdWsdIb(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float64_denormal_to_zero(op1);
op2 = float64_denormal_to_zero(op2);
}
if(ib < 4) {
@ -2917,8 +2904,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CMPSS_VssWssIb(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1 = handleDAZ(op1);
op2 = handleDAZ(op2);
op1 = float32_denormal_to_zero(op1);
op2 = float32_denormal_to_zero(op2);
}
if(ib < 4) {
@ -2970,10 +2957,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::ADDSUBPD_VpdWpd(bxInstruction_c *i)
if (MXCSR.get_DAZ())
{
op1.xmm64u(0) = handleDAZ(op1.xmm64u(0));
op1.xmm64u(1) = handleDAZ(op1.xmm64u(1));
op2.xmm64u(0) = handleDAZ(op2.xmm64u(0));
op2.xmm64u(1) = handleDAZ(op2.xmm64u(1));
op1.xmm64u(0) = float64_denormal_to_zero(op1.xmm64u(0));
op1.xmm64u(1) = float64_denormal_to_zero(op1.xmm64u(1));
op2.xmm64u(0) = float64_denormal_to_zero(op2.xmm64u(0));
op2.xmm64u(1) = float64_denormal_to_zero(op2.xmm64u(1));
}
op1.xmm64u(0) = float64_sub(op1.xmm64u(0), op2.xmm64u(0), status_word);
@ -3014,15 +3001,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::ADDSUBPS_VpsWps(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op1.xmm32u(0) = handleDAZ(op1.xmm32u(0));
op1.xmm32u(1) = handleDAZ(op1.xmm32u(1));
op1.xmm32u(2) = handleDAZ(op1.xmm32u(2));
op1.xmm32u(3) = handleDAZ(op1.xmm32u(3));
op1.xmm32u(0) = float32_denormal_to_zero(op1.xmm32u(0));
op1.xmm32u(1) = float32_denormal_to_zero(op1.xmm32u(1));
op1.xmm32u(2) = float32_denormal_to_zero(op1.xmm32u(2));
op1.xmm32u(3) = float32_denormal_to_zero(op1.xmm32u(3));
op2.xmm32u(0) = handleDAZ(op2.xmm32u(0));
op2.xmm32u(1) = handleDAZ(op2.xmm32u(1));
op2.xmm32u(2) = handleDAZ(op2.xmm32u(2));
op2.xmm32u(3) = handleDAZ(op2.xmm32u(3));
op2.xmm32u(0) = float32_denormal_to_zero(op2.xmm32u(0));
op2.xmm32u(1) = float32_denormal_to_zero(op2.xmm32u(1));
op2.xmm32u(2) = float32_denormal_to_zero(op2.xmm32u(2));
op2.xmm32u(3) = float32_denormal_to_zero(op2.xmm32u(3));
}
op1.xmm32u(0) = float32_sub(op1.xmm32u(0), op2.xmm32u(0), status_word);
@ -3069,10 +3056,10 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::ROUNDPS_VpsWpsIb(bxInstruction_c *i)
status_word.float_rounding_mode = control & 0x3;
if (MXCSR.get_DAZ()) {
op.xmm32u(0) = handleDAZ(op.xmm32u(0));
op.xmm32u(1) = handleDAZ(op.xmm32u(1));
op.xmm32u(2) = handleDAZ(op.xmm32u(2));
op.xmm32u(3) = handleDAZ(op.xmm32u(3));
op.xmm32u(0) = float32_denormal_to_zero(op.xmm32u(0));
op.xmm32u(1) = float32_denormal_to_zero(op.xmm32u(1));
op.xmm32u(2) = float32_denormal_to_zero(op.xmm32u(2));
op.xmm32u(3) = float32_denormal_to_zero(op.xmm32u(3));
}
for (unsigned j=0; j < 4; j++) {
@ -3121,8 +3108,8 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::ROUNDPD_VpdWpdIb(bxInstruction_c *i)
status_word.float_rounding_mode = control & 0x3;
if (MXCSR.get_DAZ()) {
op.xmm64u(0) = handleDAZ(op.xmm64u(0));
op.xmm64u(1) = handleDAZ(op.xmm64u(1));
op.xmm64u(0) = float64_denormal_to_zero(op.xmm64u(0));
op.xmm64u(1) = float64_denormal_to_zero(op.xmm64u(1));
}
for (unsigned j=0; j < 2; j++) {
@ -3171,7 +3158,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::ROUNDSS_VssWssIb(bxInstruction_c *i)
if ((control & 0x4) == 0)
status_word.float_rounding_mode = control & 0x3;
if (MXCSR.get_DAZ()) op = handleDAZ(op);
if (MXCSR.get_DAZ()) op = float32_denormal_to_zero(op);
if (float32_is_nan(op))
result = propagateFloat32NaN(op, status_word);
@ -3217,7 +3204,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::ROUNDSD_VsdWsdIb(bxInstruction_c *i)
if ((control & 0x4) == 0)
status_word.float_rounding_mode = control & 0x3;
if (MXCSR.get_DAZ()) op = handleDAZ(op);
if (MXCSR.get_DAZ()) op = float64_denormal_to_zero(op);
if (float64_is_nan(op))
result = propagateFloat64NaN(op, status_word);
@ -3263,15 +3250,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::DPPS_VpsWpsIb(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op1.xmm32u(0) = handleDAZ(op1.xmm32u(0));
op1.xmm32u(1) = handleDAZ(op1.xmm32u(1));
op1.xmm32u(2) = handleDAZ(op1.xmm32u(2));
op1.xmm32u(3) = handleDAZ(op1.xmm32u(3));
op1.xmm32u(0) = float32_denormal_to_zero(op1.xmm32u(0));
op1.xmm32u(1) = float32_denormal_to_zero(op1.xmm32u(1));
op1.xmm32u(2) = float32_denormal_to_zero(op1.xmm32u(2));
op1.xmm32u(3) = float32_denormal_to_zero(op1.xmm32u(3));
op2.xmm32u(0) = handleDAZ(op2.xmm32u(0));
op2.xmm32u(1) = handleDAZ(op2.xmm32u(1));
op2.xmm32u(2) = handleDAZ(op2.xmm32u(2));
op2.xmm32u(3) = handleDAZ(op2.xmm32u(3));
op2.xmm32u(0) = float32_denormal_to_zero(op2.xmm32u(0));
op2.xmm32u(1) = float32_denormal_to_zero(op2.xmm32u(1));
op2.xmm32u(2) = float32_denormal_to_zero(op2.xmm32u(2));
op2.xmm32u(3) = float32_denormal_to_zero(op2.xmm32u(3));
}
tmp.xmm64u(0) = tmp.xmm64u(1) = 0;
@ -3331,11 +3318,11 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::DPPD_VpdWpdIb(bxInstruction_c *i)
mxcsr_to_softfloat_status_word(status_word, MXCSR);
if (MXCSR.get_DAZ()) {
op1.xmm64u(0) = handleDAZ(op1.xmm64u(0));
op1.xmm64u(1) = handleDAZ(op1.xmm64u(1));
op1.xmm64u(0) = float64_denormal_to_zero(op1.xmm64u(0));
op1.xmm64u(1) = float64_denormal_to_zero(op1.xmm64u(1));
op2.xmm64u(0) = handleDAZ(op2.xmm64u(0));
op2.xmm64u(1) = handleDAZ(op2.xmm64u(1));
op2.xmm64u(0) = float64_denormal_to_zero(op2.xmm64u(0));
op2.xmm64u(1) = float64_denormal_to_zero(op2.xmm64u(1));
}
tmp.xmm64u(0) = tmp.xmm64u(1) = 0;