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/sp_fdp.c | |
parent | f5410d19b07d1d06a2ffa43db6d9b565a3a51c41 (diff) | |
download | lwn-ad8fb5537a7747187e92434dc096d3914472b51b.tar.gz lwn-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/sp_fdp.c')
-rw-r--r-- | arch/mips/math-emu/sp_fdp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/math-emu/sp_fdp.c b/arch/mips/math-emu/sp_fdp.c index 569878d7cb98..c22ffcac2651 100644 --- a/arch/mips/math-emu/sp_fdp.c +++ b/arch/mips/math-emu/sp_fdp.c @@ -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); } |