patch-2.4.19 linux-2.4.19/arch/mips/math-emu/sp_simple.c
Next file: linux-2.4.19/arch/mips/math-emu/sp_sqrt.c
Previous file: linux-2.4.19/arch/mips/math-emu/sp_mul.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/mips/math-emu/sp_simple.c
- Orig date:
Fri Apr 13 20:26:07 2001
diff -urN linux-2.4.18/arch/mips/math-emu/sp_simple.c linux-2.4.19/arch/mips/math-emu/sp_simple.c
@@ -42,7 +42,16 @@
ieee754sp ieee754sp_neg(ieee754sp x)
{
+ COMPXSP;
+
+ EXPLODEXSP;
CLEARCX;
+ FLUSHXSP;
+
+ if (xc == IEEE754_CLASS_SNAN) {
+ SETCX(IEEE754_INVALID_OPERATION);
+ return ieee754sp_nanxcpt(ieee754sp_indef(), "neg");
+ }
if (ieee754sp_isnan(x)) /* but not infinity */
return ieee754sp_nanxcpt(x, "neg", x);
@@ -55,7 +64,16 @@
ieee754sp ieee754sp_abs(ieee754sp x)
{
+ COMPXSP;
+
+ EXPLODEXSP;
CLEARCX;
+ FLUSHXSP;
+
+ 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);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)