summaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu/dp_tint.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-04-22 15:51:55 +0200
committerRalf Baechle <ralf@linux-mips.org>2014-05-23 15:11:13 +0200
commitad8fb5537a7747187e92434dc096d3914472b51b (patch)
tree57649f0df12bb0aa946bf5b6c25452398ae70f1b /arch/mips/math-emu/dp_tint.c
parentMIPS: math-emu: Call ieee754di_xcpt, not ieee754si_xcpt in ieee754dp_cmp. (diff)
downloadlinux-ad8fb5537a7747187e92434dc096d3914472b51b.tar.xz
linux-ad8fb5537a7747187e92434dc096d3914472b51b.zip
MIPS: math-emu: Replace DP_MBITS with DP_FBITS and SP_MBITS with SP_FBITS.
Both were defined as 23 rsp. 52 though the mentissa is actually a bit more than the fraction. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/math-emu/dp_tint.c')
-rw-r--r--arch/mips/math-emu/dp_tint.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/math-emu/dp_tint.c b/arch/mips/math-emu/dp_tint.c
index 792470c53779..8c39a40d7fe9 100644
--- a/arch/mips/math-emu/dp_tint.c
+++ b/arch/mips/math-emu/dp_tint.c
@@ -54,9 +54,9 @@ int ieee754dp_tint(union ieee754dp x)
return ieee754si_xcpt(ieee754si_indef(), "dp_tint", x);
}
/* oh gawd */
- if (xe > DP_MBITS) {
- xm <<= xe - DP_MBITS;
- } else if (xe < DP_MBITS) {
+ if (xe > DP_FBITS) {
+ xm <<= xe - DP_FBITS;
+ } else if (xe < DP_FBITS) {
u64 residue;
int round;
int sticky;
@@ -68,10 +68,10 @@ int ieee754dp_tint(union ieee754dp x)
sticky = residue != 0;
xm = 0;
} else {
- residue = xm << (64 - DP_MBITS + xe);
+ residue = xm << (64 - DP_FBITS + xe);
round = (residue >> 63) != 0;
sticky = (residue << 1) != 0;
- xm >>= DP_MBITS - xe;
+ xm >>= DP_FBITS - xe;
}
/* Note: At this point upper 32 bits of xm are guaranteed
to be zero */