summaryrefslogtreecommitdiff
path: root/arch/mips/math-emu/ieee754sp.h
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/ieee754sp.h
parentf5410d19b07d1d06a2ffa43db6d9b565a3a51c41 (diff)
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/ieee754sp.h')
-rw-r--r--arch/mips/math-emu/ieee754sp.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/math-emu/ieee754sp.h b/arch/mips/math-emu/ieee754sp.h
index 011d034fd86e..075ea1891280 100644
--- a/arch/mips/math-emu/ieee754sp.h
+++ b/arch/mips/math-emu/ieee754sp.h
@@ -33,21 +33,21 @@
/* 3bit extended single precision sticky right shift */
#define SPXSRSXn(rs) \
(xe += rs, \
- xm = (rs > (SP_MBITS+3))?1:((xm) >> (rs)) | ((xm) << (32-(rs)) != 0))
+ xm = (rs > (SP_FBITS+3))?1:((xm) >> (rs)) | ((xm) << (32-(rs)) != 0))
#define SPXSRSX1() \
(xe++, (xm = (xm >> 1) | (xm & 1)))
#define SPXSRSYn(rs) \
(ye+=rs, \
- ym = (rs > (SP_MBITS+3))?1:((ym) >> (rs)) | ((ym) << (32-(rs)) != 0))
+ ym = (rs > (SP_FBITS+3))?1:((ym) >> (rs)) | ((ym) << (32-(rs)) != 0))
#define SPXSRSY1() \
(ye++, (ym = (ym >> 1) | (ym & 1)))
/* convert denormal to normalized with extended exponent */
#define SPDNORMx(m,e) \
- while ((m >> SP_MBITS) == 0) { m <<= 1; e--; }
+ while ((m >> SP_FBITS) == 0) { m <<= 1; e--; }
#define SPDNORMX SPDNORMx(xm, xe)
#define SPDNORMY SPDNORMx(ym, ye)
@@ -58,7 +58,7 @@ static inline union ieee754sp buildsp(int s, int bx, unsigned m)
assert((s) == 0 || (s) == 1);
assert((bx) >= SP_EMIN - 1 + SP_EBIAS
&& (bx) <= SP_EMAX + 1 + SP_EBIAS);
- assert(((m) >> SP_MBITS) == 0);
+ assert(((m) >> SP_FBITS) == 0);
r.parts.sign = s;
r.parts.bexp = bx;