i386: round before checking for exceptions (nw)

This commit is contained in:
cracyc 2019-12-30 17:21:46 -06:00
parent 0d75d30b7d
commit b052050f3c
2 changed files with 8 additions and 16 deletions

View File

@ -2943,11 +2943,9 @@ void i386_device::x87_fst_m32real(uint8_t modrm)
value = ST(0);
}
uint32_t m32real = floatx80_to_float32(value);
if (x87_check_exceptions(true))
{
uint32_t m32real = floatx80_to_float32(value);
WRITE32(ea, m32real);
}
CYCLES(7);
}
@ -2970,11 +2968,9 @@ void i386_device::x87_fst_m64real(uint8_t modrm)
value = ST(0);
}
uint64_t m64real = floatx80_to_float64(value);
if (x87_check_exceptions(true))
{
uint64_t m64real = floatx80_to_float64(value);
WRITE64(ea, m64real);
}
CYCLES(8);
}
@ -3024,9 +3020,9 @@ void i386_device::x87_fstp_m32real(uint8_t modrm)
value = ST(0);
}
uint32_t m32real = floatx80_to_float32(value);
if (x87_check_exceptions(true))
{
uint32_t m32real = floatx80_to_float32(value);
WRITE32(ea, m32real);
x87_inc_stack();
}
@ -3053,9 +3049,9 @@ void i386_device::x87_fstp_m64real(uint8_t modrm)
uint32_t ea = Getx87EA(modrm, 1);
uint64_t m64real = floatx80_to_float64(value);
if (x87_check_exceptions(true))
{
uint64_t m64real = floatx80_to_float64(value);
WRITE64(ea, m64real);
x87_inc_stack();
}

View File

@ -2769,11 +2769,9 @@ void i8087_device::fst_m32real(u8 modrm)
value = ST(0);
}
u32 m32real = floatx80_to_float32(value);
if (check_exceptions(true))
{
u32 m32real = floatx80_to_float32(value);
WRITE32(ea, m32real);
}
CYCLES(7);
}
@ -2794,11 +2792,9 @@ void i8087_device::fst_m64real(u8 modrm)
value = ST(0);
}
u64 m64real = floatx80_to_float64(value);
if (check_exceptions(true))
{
uint64_t m64real = floatx80_to_float64(value);
WRITE64(ea, m64real);
}
CYCLES(8);
}
@ -2841,9 +2837,9 @@ void i8087_device::fstp_m32real(u8 modrm)
value = ST(0);
}
u32 m32real = floatx80_to_float32(value);
if (check_exceptions(true))
{
u32 m32real = floatx80_to_float32(value);
WRITE32(ea, m32real);
inc_stack();
}
@ -2868,9 +2864,9 @@ void i8087_device::fstp_m64real(u8 modrm)
u32 ea = m_ea;
u64 m64real = floatx80_to_float64(value);
if (check_exceptions(true))
{
uint64_t m64real = floatx80_to_float64(value);
WRITE64(ea, m64real);
inc_stack();
}