diff options
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 | } |
