summaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu/ieee754dp.h
diff options
context:
space:
mode:
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))