mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
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>
This commit is contained in:
parent
91496ea9f8
commit
fb738f8544
1 changed files with 6 additions and 13 deletions
|
@ -38,15 +38,18 @@
|
||||||
* Older GCC requires the inner braces for initialization of union ieee754dp's
|
* Older GCC requires the inner braces for initialization of union ieee754dp's
|
||||||
* anonymous struct member. Without an error will result.
|
* anonymous struct member. Without an error will result.
|
||||||
*/
|
*/
|
||||||
#define DPCNST(s, b, m) \
|
#define xPCNST(s, b, m, ebias) \
|
||||||
{ \
|
{ \
|
||||||
{ \
|
{ \
|
||||||
.sign = (s), \
|
.sign = (s), \
|
||||||
.bexp = (b) + DP_EBIAS, \
|
.bexp = (b) + ebias, \
|
||||||
.mant = (m) \
|
.mant = (m) \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define DPCNST(s, b, m) \
|
||||||
|
xPCNST(s, b, m, DP_EBIAS)
|
||||||
|
|
||||||
const union ieee754dp __ieee754dp_spcvals[] = {
|
const union ieee754dp __ieee754dp_spcvals[] = {
|
||||||
DPCNST(0, DP_EMIN - 1, 0x0000000000000ULL), /* + zero */
|
DPCNST(0, DP_EMIN - 1, 0x0000000000000ULL), /* + zero */
|
||||||
DPCNST(1, DP_EMIN - 1, 0x0000000000000ULL), /* - zero */
|
DPCNST(1, DP_EMIN - 1, 0x0000000000000ULL), /* - zero */
|
||||||
|
@ -67,18 +70,8 @@ const union ieee754dp __ieee754dp_spcvals[] = {
|
||||||
DPCNST(0, 63, 0x0000000000000ULL), /* + 1.0e63 */
|
DPCNST(0, 63, 0x0000000000000ULL), /* + 1.0e63 */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Older GCC requires the inner braces for initialization of union ieee754sp's
|
|
||||||
* anonymous struct member. Without an error will result.
|
|
||||||
*/
|
|
||||||
#define SPCNST(s, b, m) \
|
#define SPCNST(s, b, m) \
|
||||||
{ \
|
xPCNST(s, b, m, SP_EBIAS)
|
||||||
{ \
|
|
||||||
.sign = (s), \
|
|
||||||
.bexp = (b) + SP_EBIAS, \
|
|
||||||
.mant = (m) \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
const union ieee754sp __ieee754sp_spcvals[] = {
|
const union ieee754sp __ieee754sp_spcvals[] = {
|
||||||
SPCNST(0, SP_EMIN - 1, 0x000000), /* + zero */
|
SPCNST(0, SP_EMIN - 1, 0x000000), /* + zero */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue