Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: math-emu: Reduce code duplication.

The fix in the preceeding commit did do exactly the same thing in two
places showing some code cleanup was due.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+6 -13
+6 -13
arch/mips/math-emu/ieee754.c
··· 38 38 * Older GCC requires the inner braces for initialization of union ieee754dp's 39 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 44 .sign = (s), \ 45 - .bexp = (b) + DP_EBIAS, \ 45 + .bexp = (b) + ebias, \ 46 46 .mant = (m) \ 47 47 } \ 48 48 } 49 + 50 + #define DPCNST(s, b, m) \ 51 + xPCNST(s, b, m, DP_EBIAS) 49 52 50 53 const union ieee754dp __ieee754dp_spcvals[] = { 51 54 DPCNST(0, DP_EMIN - 1, 0x0000000000000ULL), /* + zero */ ··· 70 67 DPCNST(0, 63, 0x0000000000000ULL), /* + 1.0e63 */ 71 68 }; 72 69 73 - /* 74 - * Older GCC requires the inner braces for initialization of union ieee754sp's 75 - * anonymous struct member. Without an error will result. 76 - */ 77 70 #define SPCNST(s, b, m) \ 78 - { \ 79 - { \ 80 - .sign = (s), \ 81 - .bexp = (b) + SP_EBIAS, \ 82 - .mant = (m) \ 83 - } \ 84 - } 71 + xPCNST(s, b, m, SP_EBIAS) 85 72 86 73 const union ieee754sp __ieee754sp_spcvals[] = { 87 74 SPCNST(0, SP_EMIN - 1, 0x000000), /* + zero */