Thiemo, in May you added this:

-    update_fcr31();       \
+    update_fcr31();                                           \
+    if (GET_FP_CAUSE(env->fcr31) & FP_INVALID)                \
+        FST2 = 0x7fbfffff;                                    \
+    else if (GET_FP_CAUSE(env->fcr31) & FP_UNDERFLOW) {       \
+        if ((env->fcr31 & 0x3) == 0)                          \
+            FST2 &= 0x80000000ULL;                            \
+    }                     \

That last bit says that if underflow is detected and the rounding mode
is round-to-nearest, return an signed appropriate signed zero.  Why?
The MIPS ISA docs say a rounded result is returned in this case, and
that's what's in FST2 if that code is removed.

This shows up in the mul-subnormal-single-1.c test from GCC's ieee.exp.

-- 
Daniel Jacobowitz
CodeSourcery


Reply via email to