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>
This commit is contained in:
Ralf Baechle
2014-04-22 15:51:55 +02:00
parent f5410d19b0
commit ad8fb5537a
25 changed files with 100 additions and 100 deletions

View File

@@ -43,7 +43,7 @@ union ieee754sp ieee754sp_fdp(union ieee754dp x)
return ieee754sp_nanxcpt(ieee754sp_indef(), "fdp");
case IEEE754_CLASS_QNAN:
nan = buildsp(xs, SP_EMAX + 1 + SP_EBIAS, (u32)
(xm >> (DP_MBITS - SP_MBITS)));
(xm >> (DP_FBITS - SP_FBITS)));
if (!ieee754sp_isnan(nan))
nan = ieee754sp_indef();
return ieee754sp_nanxcpt(nan, "fdp", x);
@@ -66,10 +66,10 @@ union ieee754sp ieee754sp_fdp(union ieee754dp x)
{
u32 rm;
/* convert from DP_MBITS to SP_MBITS+3 with sticky right shift
/* convert from DP_FBITS to SP_FBITS+3 with sticky right shift
*/
rm = (xm >> (DP_MBITS - (SP_MBITS + 3))) |
((xm << (64 - (DP_MBITS - (SP_MBITS + 3)))) != 0);
rm = (xm >> (DP_FBITS - (SP_FBITS + 3))) |
((xm << (64 - (DP_FBITS - (SP_FBITS + 3)))) != 0);
SPNORMRET1(xs, xe, rm, "fdp", x);
}