summaryrefslogtreecommitdiff
path: root/arch/mips/math-emu/ieee754dp.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/ieee754dp.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/ieee754dp.h')
-rw-r--r--arch/mips/math-emu/ieee754dp.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/mips/math-emu/ieee754dp.h b/arch/mips/math-emu/ieee754dp.h
index f8f358a9072c..216bab308dc5 100644
--- a/arch/mips/math-emu/ieee754dp.h
+++ b/arch/mips/math-emu/ieee754dp.h
@@ -30,6 +30,20 @@
#define assert(expr) ((void)0)
+#define DP_EBIAS 1023
+#define DP_EMIN (-1022)
+#define DP_EMAX 1023
+#define DP_FBITS 52
+#define DP_MBITS 52
+
+#define DP_MBIT(x) ((u64)1 << (x))
+#define DP_HIDDEN_BIT DP_MBIT(DP_FBITS)
+#define DP_SIGN_BIT DP_MBIT(63)
+
+#define DPSIGN(dp) (dp.parts.sign)
+#define DPBEXP(dp) (dp.parts.bexp)
+#define DPMANT(dp) (dp.parts.mant)
+
/* 3bit extended double precision sticky right shift */
#define XDPSRS(v,rs) \
((rs > (DP_FBITS+3))?1:((v) >> (rs)) | ((v) << (64-(rs)) != 0))