summaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu/dp_modf.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_modf.c
parentf5410d19b07d1d06a2ffa43db6d9b565a3a51c41 (diff)
downloadop-kernel-dev-ad8fb5537a7747187e92434dc096d3914472b51b.zip
op-kernel-dev-ad8fb5537a7747187e92434dc096d3914472b51b.tar.gz
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_modf.c')
-rw-r--r--arch/mips/math-emu/dp_modf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/math-emu/dp_modf.c b/arch/mips/math-emu/dp_modf.c
index 61733ff..d83ec44 100644
--- a/arch/mips/math-emu/dp_modf.c
+++ b/arch/mips/math-emu/dp_modf.c
@@ -54,24 +54,24 @@ union ieee754dp ieee754dp_modf(union ieee754dp x, union ieee754dp *ip)
*ip = ieee754dp_zero(xs);
return x;
}
- if (xe >= DP_MBITS) {
+ if (xe >= DP_FBITS) {
*ip = x;
return ieee754dp_zero(xs);
}
/* generate ipart mantissa by clearing bottom bits
*/
*ip = builddp(xs, xe + DP_EBIAS,
- ((xm >> (DP_MBITS - xe)) << (DP_MBITS - xe)) &
+ ((xm >> (DP_FBITS - xe)) << (DP_FBITS - xe)) &
~DP_HIDDEN_BIT);
/* generate fpart mantissa by clearing top bits
* and normalizing (must be able to normalize)
*/
- xm = (xm << (64 - (DP_MBITS - xe))) >> (64 - (DP_MBITS - xe));
+ xm = (xm << (64 - (DP_FBITS - xe))) >> (64 - (DP_FBITS - xe));
if (xm == 0)
return ieee754dp_zero(xs);
- while ((xm >> DP_MBITS) == 0) {
+ while ((xm >> DP_FBITS) == 0) {
xm <<= 1;
xe--;
}
OpenPOWER on IntegriCloud