mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
EE: RSQRT.S raised D on every zero divisor
It never looked at the dividend, which is what decides the cause. Both single-precision tiers move together: the differential fuzzer in ee_rec_fpu_rsqrt_tests.cpp diffs the interpreter against the fast path on exactly this operand class, so neither passes alone.
This commit is contained in:
+5
-1
@@ -1091,7 +1091,11 @@ void RSQRT_S() {
|
||||
clearFPUFlags(FPUflagD | FPUflagI);
|
||||
|
||||
if ( ( _FtValUl_ & 0x7F800000 ) == 0 ) { // Ft is zero (Denormals are Zero)
|
||||
_ContVal_ |= FPUflagD | FPUflagSD;
|
||||
// The dividend decides the cause: zero over zero is invalid, anything
|
||||
// else over zero is a divide by zero. Same test checkDivideByZero
|
||||
// makes, so a denormal Fs counts as zero here too.
|
||||
_ContVal_ |= ( ( _FsValUl_ & 0x7F800000 ) == 0 ) ? ( FPUflagI | FPUflagSI )
|
||||
: ( FPUflagD | FPUflagSD );
|
||||
// The EE maximum, and the sign of Fs alone -- no xor, unlike DIV.S:
|
||||
// rsqrt takes |Ft|, so the divisor has no sign left to contribute by the
|
||||
// time the division happens. Console rows 59 and 63: rsqrt(+0, -0) is
|
||||
|
||||
Reference in New Issue
Block a user