diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-04-22 15:51:55 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-23 15:11:13 +0200 |
commit | ad8fb5537a7747187e92434dc096d3914472b51b (patch) | |
tree | 57649f0df12bb0aa946bf5b6c25452398ae70f1b /arch/mips/math-emu/dp_modf.c | |
parent | MIPS: math-emu: Call ieee754di_xcpt, not ieee754si_xcpt in ieee754dp_cmp. (diff) | |
download | linux-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_modf.c')
-rw-r--r-- | arch/mips/math-emu/dp_modf.c | 8 |
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 61733ff512c7..d83ec44f1a33 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--; } |