summaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu/sp_tlong.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-04-30 11:21:55 +0200
committerRalf Baechle <ralf@linux-mips.org>2014-05-23 15:12:38 +0200
commit56a6473339dbd2e908cf8c6f2856d5de2bf8d15b (patch)
treea500f42c8e140cd909d0a5340474f6012c0740b4 /arch/mips/math-emu/sp_tlong.c
parentaef3fb76aa1390ef864db888d06d8fcd5510df2d (diff)
downloadlinux-0-day-56a6473339dbd2e908cf8c6f2856d5de2bf8d15b.tar.gz
linux-0-day-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_tlong.c')
-rw-r--r--arch/mips/math-emu/sp_tlong.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/math-emu/sp_tlong.c b/arch/mips/math-emu/sp_tlong.c
index 67eff6ba9e18d..9f3c742c1cea6 100644
--- a/arch/mips/math-emu/sp_tlong.c
+++ b/arch/mips/math-emu/sp_tlong.c
@@ -76,17 +76,17 @@ s64 ieee754sp_tlong(union ieee754sp x)
}
odd = (xm & 0x1) != 0x0;
switch (ieee754_csr.rm) {
- case IEEE754_RN:
+ case FPU_CSR_RN:
if (round && (sticky || odd))
xm++;
break;
- case IEEE754_RZ:
+ case FPU_CSR_RZ:
break;
- case IEEE754_RU: /* toward +Infinity */
+ case FPU_CSR_RU: /* toward +Infinity */
if ((round || sticky) && !xs)
xm++;
break;
- case IEEE754_RD: /* toward -Infinity */
+ case FPU_CSR_RD: /* toward -Infinity */
if ((round || sticky) && xs)
xm++;
break;