diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-04 09:59:47 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-04 09:59:47 -0500 |
commit | 5cb2faa6ede7ada9cb2bffc832c4ce60f53d6834 (patch) | |
tree | 7b72b66081d042a41dc822575503133364857ce2 /arch/mips/math-emu/dp_simple.c | |
parent | e0ee98513d1a2e24d2ddbdecf4216bcca29d1158 (diff) | |
parent | 6060e8df517847bf445ebc61de7d4d9c7faae990 (diff) |
Merge branch 'pending-misc' (early part) into devel
Diffstat (limited to 'arch/mips/math-emu/dp_simple.c')
-rw-r--r-- | arch/mips/math-emu/dp_simple.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/mips/math-emu/dp_simple.c b/arch/mips/math-emu/dp_simple.c index 1c555e6c6a9f..d9ae1dbabda7 100644 --- a/arch/mips/math-emu/dp_simple.c +++ b/arch/mips/math-emu/dp_simple.c | |||
@@ -62,8 +62,6 @@ ieee754dp ieee754dp_neg(ieee754dp x) | |||
62 | return ieee754dp_nanxcpt(y, "neg"); | 62 | return ieee754dp_nanxcpt(y, "neg"); |
63 | } | 63 | } |
64 | 64 | ||
65 | if (ieee754dp_isnan(x)) /* but not infinity */ | ||
66 | return ieee754dp_nanxcpt(x, "neg", x); | ||
67 | return x; | 65 | return x; |
68 | } | 66 | } |
69 | 67 | ||
@@ -76,15 +74,12 @@ ieee754dp ieee754dp_abs(ieee754dp x) | |||
76 | CLEARCX; | 74 | CLEARCX; |
77 | FLUSHXDP; | 75 | FLUSHXDP; |
78 | 76 | ||
77 | /* Clear sign ALWAYS, irrespective of NaN */ | ||
78 | DPSIGN(x) = 0; | ||
79 | |||
79 | if (xc == IEEE754_CLASS_SNAN) { | 80 | if (xc == IEEE754_CLASS_SNAN) { |
80 | SETCX(IEEE754_INVALID_OPERATION); | 81 | return ieee754dp_nanxcpt(ieee754dp_indef(), "abs"); |
81 | return ieee754dp_nanxcpt(ieee754dp_indef(), "neg"); | ||
82 | } | 82 | } |
83 | 83 | ||
84 | if (ieee754dp_isnan(x)) /* but not infinity */ | ||
85 | return ieee754dp_nanxcpt(x, "abs", x); | ||
86 | |||
87 | /* quick fix up */ | ||
88 | DPSIGN(x) = 0; | ||
89 | return x; | 84 | return x; |
90 | } | 85 | } |