diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-04-30 05:21:55 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-23 09:12:38 -0400 |
commit | 56a6473339dbd2e908cf8c6f2856d5de2bf8d15b (patch) | |
tree | a500f42c8e140cd909d0a5340474f6012c0740b4 /arch/mips/math-emu/dp_add.c | |
parent | aef3fb76aa1390ef864db888d06d8fcd5510df2d (diff) |
MIPS: math-emu: Switch to using the MIPS rounding modes.
Previously math-emu was using the IEEE-754 constants internally. These
were differing by having the constants for rounding to +/- infinity
switched, so a conversion was necessary. This would be entirely
avoidable if the MIPS constants were used throughout, so get rid of
the bloat.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/math-emu/dp_add.c')
-rw-r--r-- | arch/mips/math-emu/dp_add.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/math-emu/dp_add.c b/arch/mips/math-emu/dp_add.c index 9c98b96f7287..7f64577df984 100644 --- a/arch/mips/math-emu/dp_add.c +++ b/arch/mips/math-emu/dp_add.c | |||
@@ -91,7 +91,7 @@ union ieee754dp ieee754dp_add(union ieee754dp x, union ieee754dp y) | |||
91 | if (xs == ys) | 91 | if (xs == ys) |
92 | return x; | 92 | return x; |
93 | else | 93 | else |
94 | return ieee754dp_zero(ieee754_csr.rm == IEEE754_RD); | 94 | return ieee754dp_zero(ieee754_csr.rm == FPU_CSR_RD); |
95 | 95 | ||
96 | case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_ZERO): | 96 | case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_ZERO): |
97 | case CLPAIR(IEEE754_CLASS_DNORM, IEEE754_CLASS_ZERO): | 97 | case CLPAIR(IEEE754_CLASS_DNORM, IEEE754_CLASS_ZERO): |
@@ -168,7 +168,7 @@ union ieee754dp ieee754dp_add(union ieee754dp x, union ieee754dp y) | |||
168 | xs = ys; | 168 | xs = ys; |
169 | } | 169 | } |
170 | if (xm == 0) | 170 | if (xm == 0) |
171 | return ieee754dp_zero(ieee754_csr.rm == IEEE754_RD); | 171 | return ieee754dp_zero(ieee754_csr.rm == FPU_CSR_RD); |
172 | 172 | ||
173 | /* | 173 | /* |
174 | * Normalize to rounding precision. | 174 | * Normalize to rounding precision. |