summaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu/sp_simple.c
diff options
context:
space:
mode:
authorRussell King2009-12-04 15:59:47 +0100
committerRussell King2009-12-04 15:59:47 +0100
commit5cb2faa6ede7ada9cb2bffc832c4ce60f53d6834 (patch)
tree7b72b66081d042a41dc822575503133364857ce2 /arch/mips/math-emu/sp_simple.c
parentARM: 5846/1: MAINTAINERS: Add arm Nomadik support (diff)
parentARM: I-cache: flush executable mappings in flush_cache_range() (diff)
downloadkernel-qcow2-linux-5cb2faa6ede7ada9cb2bffc832c4ce60f53d6834.tar.gz
kernel-qcow2-linux-5cb2faa6ede7ada9cb2bffc832c4ce60f53d6834.tar.xz
kernel-qcow2-linux-5cb2faa6ede7ada9cb2bffc832c4ce60f53d6834.zip
Merge branch 'pending-misc' (early part) into devel
Diffstat (limited to 'arch/mips/math-emu/sp_simple.c')
-rw-r--r--arch/mips/math-emu/sp_simple.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/mips/math-emu/sp_simple.c b/arch/mips/math-emu/sp_simple.c
index 770f0f4677cd..3175477d36f6 100644
--- a/arch/mips/math-emu/sp_simple.c
+++ b/arch/mips/math-emu/sp_simple.c
@@ -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;
}