summaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu/sp_mul.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/sp_mul.c
parentMIPS: math-emu: Call ieee754di_xcpt, not ieee754si_xcpt in ieee754dp_cmp. (diff)
downloadlinux-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/sp_mul.c')
-rw-r--r--arch/mips/math-emu/sp_mul.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/mips/math-emu/sp_mul.c b/arch/mips/math-emu/sp_mul.c
index 844b3bde0ab6..28f608f25499 100644
--- a/arch/mips/math-emu/sp_mul.c
+++ b/arch/mips/math-emu/sp_mul.c
@@ -114,8 +114,8 @@ union ieee754sp ieee754sp_mul(union ieee754sp x, union ieee754sp y)
unsigned rm;
/* shunt to top of word */
- xm <<= 32 - (SP_MBITS + 1);
- ym <<= 32 - (SP_MBITS + 1);
+ xm <<= 32 - (SP_FBITS + 1);
+ ym <<= 32 - (SP_FBITS + 1);
/* multiply 32bits xm,ym to give high 32bits rm with stickness
*/
@@ -156,12 +156,12 @@ union ieee754sp ieee754sp_mul(union ieee754sp x, union ieee754sp y)
* sticky shift down to normal rounding precision
*/
if ((int) rm < 0) {
- rm = (rm >> (32 - (SP_MBITS + 1 + 3))) |
- ((rm << (SP_MBITS + 1 + 3)) != 0);
+ rm = (rm >> (32 - (SP_FBITS + 1 + 3))) |
+ ((rm << (SP_FBITS + 1 + 3)) != 0);
re++;
} else {
- rm = (rm >> (32 - (SP_MBITS + 1 + 3 + 1))) |
- ((rm << (SP_MBITS + 1 + 3 + 1)) != 0);
+ rm = (rm >> (32 - (SP_FBITS + 1 + 3 + 1))) |
+ ((rm << (SP_FBITS + 1 + 3 + 1)) != 0);
}
assert(rm & (SP_HIDDEN_BIT << 3));