aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu/ieee754.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/math-emu/ieee754.c')
-rw-r--r--arch/mips/math-emu/ieee754.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/arch/mips/math-emu/ieee754.c b/arch/mips/math-emu/ieee754.c
index cb9214da372f..8e97acbbe22c 100644
--- a/arch/mips/math-emu/ieee754.c
+++ b/arch/mips/math-emu/ieee754.c
@@ -38,15 +38,18 @@
38 * Older GCC requires the inner braces for initialization of union ieee754dp's 38 * Older GCC requires the inner braces for initialization of union ieee754dp's
39 * anonymous struct member. Without an error will result. 39 * anonymous struct member. Without an error will result.
40 */ 40 */
41#define DPCNST(s, b, m) \ 41#define xPCNST(s, b, m, ebias) \
42{ \ 42{ \
43 { \ 43 { \
44 .sign = (s), \ 44 .sign = (s), \
45 .bexp = (b) + DP_EBIAS, \ 45 .bexp = (b) + ebias, \
46 .mant = (m) \ 46 .mant = (m) \
47 } \ 47 } \
48} 48}
49 49
50#define DPCNST(s, b, m) \
51 xPCNST(s, b, m, DP_EBIAS)
52
50const union ieee754dp __ieee754dp_spcvals[] = { 53const union ieee754dp __ieee754dp_spcvals[] = {
51 DPCNST(0, DP_EMIN - 1, 0x0000000000000ULL), /* + zero */ 54 DPCNST(0, DP_EMIN - 1, 0x0000000000000ULL), /* + zero */
52 DPCNST(1, DP_EMIN - 1, 0x0000000000000ULL), /* - zero */ 55 DPCNST(1, DP_EMIN - 1, 0x0000000000000ULL), /* - zero */
@@ -67,18 +70,8 @@ const union ieee754dp __ieee754dp_spcvals[] = {
67 DPCNST(0, 63, 0x0000000000000ULL), /* + 1.0e63 */ 70 DPCNST(0, 63, 0x0000000000000ULL), /* + 1.0e63 */
68}; 71};
69 72
70/*
71 * Older GCC requires the inner braces for initialization of union ieee754sp's
72 * anonymous struct member. Without an error will result.
73 */
74#define SPCNST(s, b, m) \ 73#define SPCNST(s, b, m) \
75{ \ 74 xPCNST(s, b, m, SP_EBIAS)
76 { \
77 .sign = (s), \
78 .bexp = (b) + SP_EBIAS, \
79 .mant = (m) \
80 } \
81}
82 75
83const union ieee754sp __ieee754sp_spcvals[] = { 76const union ieee754sp __ieee754sp_spcvals[] = {
84 SPCNST(0, SP_EMIN - 1, 0x000000), /* + zero */ 77 SPCNST(0, SP_EMIN - 1, 0x000000), /* + zero */