summaryrefslogtreecommitdiff
path: root/arch/mips/math-emu/ieee754sp.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-04-22 16:33:07 +0200
committerRalf Baechle <ralf@linux-mips.org>2014-05-23 15:11:13 +0200
commitb3a7ad2b0c48e046ff8a7934f3aa55fc06c54762 (patch)
treed1bbd22d16d03ba2e651fa60d08a81857327fabc /arch/mips/math-emu/ieee754sp.h
parent3e160aad0f23cc80743dd44810269c9667e0eb0e (diff)
MIPS: math-emu: Eleminate duplicate definitions of identical macros.
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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/mips/math-emu/ieee754sp.h b/arch/mips/math-emu/ieee754sp.h
index 075ea1891280..a28ced853f27 100644
--- a/arch/mips/math-emu/ieee754sp.h
+++ b/arch/mips/math-emu/ieee754sp.h
@@ -30,6 +30,20 @@
#define assert(expr) ((void)0)
+#define SP_EBIAS 127
+#define SP_EMIN (-126)
+#define SP_EMAX 127
+#define SP_FBITS 23
+#define SP_MBITS 23
+
+#define SP_MBIT(x) ((u32)1 << (x))
+#define SP_HIDDEN_BIT SP_MBIT(SP_FBITS)
+#define SP_SIGN_BIT SP_MBIT(31)
+
+#define SPSIGN(sp) (sp.parts.sign)
+#define SPBEXP(sp) (sp.parts.bexp)
+#define SPMANT(sp) (sp.parts.mant)
+
/* 3bit extended single precision sticky right shift */
#define SPXSRSXn(rs) \
(xe += rs, \