summaryrefslogtreecommitdiff
path: root/arch/mips/math-emu/sp_sqrt.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-04-30 13:21:55 +0400
committerRalf Baechle <ralf@linux-mips.org>2014-05-23 17:12:38 +0400
commit56a6473339dbd2e908cf8c6f2856d5de2bf8d15b (patch)
treea500f42c8e140cd909d0a5340474f6012c0740b4 /arch/mips/math-emu/sp_sqrt.c
parentaef3fb76aa1390ef864db888d06d8fcd5510df2d (diff)
downloadlinux-56a6473339dbd2e908cf8c6f2856d5de2bf8d15b.tar.xz
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/sp_sqrt.c')
-rw-r--r--arch/mips/math-emu/sp_sqrt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/math-emu/sp_sqrt.c b/arch/mips/math-emu/sp_sqrt.c
index 94f5befa1d70..b7c098a86f95 100644
--- a/arch/mips/math-emu/sp_sqrt.c
+++ b/arch/mips/math-emu/sp_sqrt.c
@@ -100,10 +100,10 @@ union ieee754sp ieee754sp_sqrt(union ieee754sp x)
if (ix != 0) {
ieee754_setcx(IEEE754_INEXACT);
switch (ieee754_csr.rm) {
- case IEEE754_RU:
+ case FPU_CSR_RU:
q += 2;
break;
- case IEEE754_RN:
+ case FPU_CSR_RN:
q += (q & 1);
break;
}