ARM: 5821/1: SA1100: h3100/h3600: revise copyright boilerplates
[pandora-kernel.git] / arch / mips / math-emu / sp_simple.c
index 770f0f4..3175477 100644 (file)
@@ -62,8 +62,6 @@ ieee754sp ieee754sp_neg(ieee754sp x)
                return ieee754sp_nanxcpt(y, "neg");
        }
 
-       if (ieee754sp_isnan(x)) /* but not infinity */
-               return ieee754sp_nanxcpt(x, "neg", x);
        return x;
 }
 
@@ -76,15 +74,12 @@ ieee754sp ieee754sp_abs(ieee754sp x)
        CLEARCX;
        FLUSHXSP;
 
+       /* Clear sign ALWAYS, irrespective of NaN */
+       SPSIGN(x) = 0;
+
        if (xc == IEEE754_CLASS_SNAN) {
-               SETCX(IEEE754_INVALID_OPERATION);
                return ieee754sp_nanxcpt(ieee754sp_indef(), "abs");
        }
 
-       if (ieee754sp_isnan(x)) /* but not infinity */
-               return ieee754sp_nanxcpt(x, "abs", x);
-
-       /* quick fix up */
-       SPSIGN(x) = 0;
        return x;
 }