summaryrefslogtreecommitdiff
path: root/arch/mips/math-emu/sp_modf.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-04-22 17:51:55 +0400
committerRalf Baechle <ralf@linux-mips.org>2014-05-23 17:11:13 +0400
commitad8fb5537a7747187e92434dc096d3914472b51b (patch)
tree57649f0df12bb0aa946bf5b6c25452398ae70f1b /arch/mips/math-emu/sp_modf.c
parentf5410d19b07d1d06a2ffa43db6d9b565a3a51c41 (diff)
downloadlinux-ad8fb5537a7747187e92434dc096d3914472b51b.tar.xz
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/sp_modf.c')
-rw-r--r--arch/mips/math-emu/sp_modf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/math-emu/sp_modf.c b/arch/mips/math-emu/sp_modf.c
index 22f19a22ab02..5f361a7a10b6 100644
--- a/arch/mips/math-emu/sp_modf.c
+++ b/arch/mips/math-emu/sp_modf.c
@@ -54,24 +54,24 @@ union ieee754sp ieee754sp_modf(union ieee754sp x, union ieee754sp *ip)
*ip = ieee754sp_zero(xs);
return x;
}
- if (xe >= SP_MBITS) {
+ if (xe >= SP_FBITS) {
*ip = x;
return ieee754sp_zero(xs);
}
/* generate ipart mantissa by clearing bottom bits
*/
*ip = buildsp(xs, xe + SP_EBIAS,
- ((xm >> (SP_MBITS - xe)) << (SP_MBITS - xe)) &
+ ((xm >> (SP_FBITS - xe)) << (SP_FBITS - xe)) &
~SP_HIDDEN_BIT);
/* generate fpart mantissa by clearing top bits
* and normalizing (must be able to normalize)
*/
- xm = (xm << (32 - (SP_MBITS - xe))) >> (32 - (SP_MBITS - xe));
+ xm = (xm << (32 - (SP_FBITS - xe))) >> (32 - (SP_FBITS - xe));
if (xm == 0)
return ieee754sp_zero(xs);
- while ((xm >> SP_MBITS) == 0) {
+ while ((xm >> SP_FBITS) == 0) {
xm <<= 1;
xe--;
}