diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-04-16 01:31:11 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-21 11:12:48 +0200 |
commit | 2209bcb1310ffa9ee1af12573f1413581c712b15 (patch) | |
tree | eba9f53adc3bb83dc499f15873d4e49886662122 /arch/mips/math-emu | |
parent | 23708818210cec367083ce9c09c6e71a5767d7e3 (diff) |
MIPS: math-emu: Get rid of typedefs.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/math-emu')
40 files changed, 212 insertions, 212 deletions
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index 7b3c9acae689..d670e3973bf1 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c @@ -1349,8 +1349,8 @@ static const unsigned char cmptab[8] = { */ #define DEF3OP(name, p, f1, f2, f3) \ -static ieee754##p fpemu_##p##_##name(ieee754##p r, ieee754##p s, \ - ieee754##p t) \ +static union ieee754##p fpemu_##p##_##name(union ieee754##p r, union ieee754##p s, \ + union ieee754##p t) \ { \ struct _ieee754_csr ieee754_csr_save; \ s = f1(s, t); \ @@ -1364,22 +1364,22 @@ static ieee754##p fpemu_##p##_##name(ieee754##p r, ieee754##p s, \ return s; \ } -static ieee754dp fpemu_dp_recip(ieee754dp d) +static union ieee754dp fpemu_dp_recip(union ieee754dp d) { return ieee754dp_div(ieee754dp_one(0), d); } -static ieee754dp fpemu_dp_rsqrt(ieee754dp d) +static union ieee754dp fpemu_dp_rsqrt(union ieee754dp d) { return ieee754dp_div(ieee754dp_one(0), ieee754dp_sqrt(d)); } -static ieee754sp fpemu_sp_recip(ieee754sp s) +static union ieee754sp fpemu_sp_recip(union ieee754sp s) { return ieee754sp_div(ieee754sp_one(0), s); } -static ieee754sp fpemu_sp_rsqrt(ieee754sp s) +static union ieee754sp fpemu_sp_rsqrt(union ieee754sp s) { return ieee754sp_div(ieee754sp_one(0), ieee754sp_sqrt(s)); } @@ -1403,8 +1403,8 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, switch (MIPSInst_FMA_FFMT(ir)) { case s_fmt:{ /* 0 */ - ieee754sp(*handler) (ieee754sp, ieee754sp, ieee754sp); - ieee754sp fd, fr, fs, ft; + union ieee754sp(*handler) (union ieee754sp, union ieee754sp, union ieee754sp); + union ieee754sp fd, fr, fs, ft; u32 __user *va; u32 val; @@ -1492,8 +1492,8 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, } case d_fmt:{ /* 1 */ - ieee754dp(*handler) (ieee754dp, ieee754dp, ieee754dp); - ieee754dp fd, fr, fs, ft; + union ieee754dp(*handler) (union ieee754dp, union ieee754dp, union ieee754dp); + union ieee754dp fd, fr, fs, ft; u64 __user *va; u64 val; @@ -1588,8 +1588,8 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, unsigned rcsr = 0; /* resulting csr */ unsigned cond; union { - ieee754dp d; - ieee754sp s; + union ieee754dp d; + union ieee754sp s; int w; #ifdef __mips64 s64 l; @@ -1600,8 +1600,8 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, switch (rfmt = (MIPSInst_FFMT(ir) & 0xf)) { case s_fmt:{ /* 0 */ union { - ieee754sp(*b) (ieee754sp, ieee754sp); - ieee754sp(*u) (ieee754sp); + union ieee754sp(*b) (union ieee754sp, union ieee754sp); + union ieee754sp(*u) (union ieee754sp); } handler; switch (MIPSInst_FUNC(ir)) { @@ -1666,7 +1666,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, /* binary op on handler */ scopbop: { - ieee754sp fs, ft; + union ieee754sp fs, ft; SPFROMREG(fs, MIPSInst_FS(ir)); SPFROMREG(ft, MIPSInst_FT(ir)); @@ -1676,7 +1676,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, } scopuop: { - ieee754sp fs; + union ieee754sp fs; SPFROMREG(fs, MIPSInst_FS(ir)); rv.s = (*handler.u) (fs); @@ -1699,7 +1699,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, case fcvts_op: return SIGILL; /* not defined */ case fcvtd_op:{ - ieee754sp fs; + union ieee754sp fs; SPFROMREG(fs, MIPSInst_FS(ir)); rv.d = ieee754dp_fsp(fs); @@ -1707,7 +1707,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, goto copcsr; } case fcvtw_op:{ - ieee754sp fs; + union ieee754sp fs; SPFROMREG(fs, MIPSInst_FS(ir)); rv.w = ieee754sp_tint(fs); @@ -1721,7 +1721,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, case fceil_op: case ffloor_op:{ unsigned int oldrm = ieee754_csr.rm; - ieee754sp fs; + union ieee754sp fs; SPFROMREG(fs, MIPSInst_FS(ir)); ieee754_csr.rm = ieee_rm[modeindex(MIPSInst_FUNC(ir))]; @@ -1734,7 +1734,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, #if defined(__mips64) case fcvtl_op:{ - ieee754sp fs; + union ieee754sp fs; SPFROMREG(fs, MIPSInst_FS(ir)); rv.l = ieee754sp_tlong(fs); @@ -1747,7 +1747,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, case fceill_op: case ffloorl_op:{ unsigned int oldrm = ieee754_csr.rm; - ieee754sp fs; + union ieee754sp fs; SPFROMREG(fs, MIPSInst_FS(ir)); ieee754_csr.rm = ieee_rm[modeindex(MIPSInst_FUNC(ir))]; @@ -1761,7 +1761,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, default: if (MIPSInst_FUNC(ir) >= fcmp_op) { unsigned cmpop = MIPSInst_FUNC(ir) - fcmp_op; - ieee754sp fs, ft; + union ieee754sp fs, ft; SPFROMREG(fs, MIPSInst_FS(ir)); SPFROMREG(ft, MIPSInst_FT(ir)); @@ -1785,8 +1785,8 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, case d_fmt:{ union { - ieee754dp(*b) (ieee754dp, ieee754dp); - ieee754dp(*u) (ieee754dp); + union ieee754dp(*b) (union ieee754dp, union ieee754dp); + union ieee754dp(*u) (union ieee754dp); } handler; switch (MIPSInst_FUNC(ir)) { @@ -1852,7 +1852,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, /* binary op on handler */ dcopbop:{ - ieee754dp fs, ft; + union ieee754dp fs, ft; DPFROMREG(fs, MIPSInst_FS(ir)); DPFROMREG(ft, MIPSInst_FT(ir)); @@ -1861,7 +1861,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, goto copcsr; } dcopuop:{ - ieee754dp fs; + union ieee754dp fs; DPFROMREG(fs, MIPSInst_FS(ir)); rv.d = (*handler.u) (fs); @@ -1870,7 +1870,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, /* unary conv ops */ case fcvts_op:{ - ieee754dp fs; + union ieee754dp fs; DPFROMREG(fs, MIPSInst_FS(ir)); rv.s = ieee754sp_fdp(fs); @@ -1881,7 +1881,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, return SIGILL; /* not defined */ case fcvtw_op:{ - ieee754dp fs; + union ieee754dp fs; DPFROMREG(fs, MIPSInst_FS(ir)); rv.w = ieee754dp_tint(fs); /* wrong */ @@ -1895,7 +1895,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, case fceil_op: case ffloor_op:{ unsigned int oldrm = ieee754_csr.rm; - ieee754dp fs; + union ieee754dp fs; DPFROMREG(fs, MIPSInst_FS(ir)); ieee754_csr.rm = ieee_rm[modeindex(MIPSInst_FUNC(ir))]; @@ -1908,7 +1908,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, #if defined(__mips64) case fcvtl_op:{ - ieee754dp fs; + union ieee754dp fs; DPFROMREG(fs, MIPSInst_FS(ir)); rv.l = ieee754dp_tlong(fs); @@ -1921,7 +1921,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, case fceill_op: case ffloorl_op:{ unsigned int oldrm = ieee754_csr.rm; - ieee754dp fs; + union ieee754dp fs; DPFROMREG(fs, MIPSInst_FS(ir)); ieee754_csr.rm = ieee_rm[modeindex(MIPSInst_FUNC(ir))]; @@ -1935,7 +1935,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, default: if (MIPSInst_FUNC(ir) >= fcmp_op) { unsigned cmpop = MIPSInst_FUNC(ir) - fcmp_op; - ieee754dp fs, ft; + union ieee754dp fs, ft; DPFROMREG(fs, MIPSInst_FS(ir)); DPFROMREG(ft, MIPSInst_FT(ir)); @@ -1960,7 +1960,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, } case w_fmt:{ - ieee754sp fs; + union ieee754sp fs; switch (MIPSInst_FUNC(ir)) { case fcvts_op: diff --git a/arch/mips/math-emu/dp_add.c b/arch/mips/math-emu/dp_add.c index c57c8adc42c4..b5aac129e9f1 100644 --- a/arch/mips/math-emu/dp_add.c +++ b/arch/mips/math-emu/dp_add.c @@ -27,7 +27,7 @@ #include "ieee754dp.h" -ieee754dp ieee754dp_add(ieee754dp x, ieee754dp y) +union ieee754dp ieee754dp_add(union ieee754dp x, union ieee754dp y) { COMPXDP; COMPYDP; diff --git a/arch/mips/math-emu/dp_cmp.c b/arch/mips/math-emu/dp_cmp.c index 0f32486b0ed9..a3b4984d2e83 100644 --- a/arch/mips/math-emu/dp_cmp.c +++ b/arch/mips/math-emu/dp_cmp.c @@ -26,7 +26,7 @@ #include "ieee754dp.h" -int ieee754dp_cmp(ieee754dp x, ieee754dp y, int cmp, int sig) +int ieee754dp_cmp(union ieee754dp x, union ieee754dp y, int cmp, int sig) { COMPXDP; COMPYDP; diff --git a/arch/mips/math-emu/dp_div.c b/arch/mips/math-emu/dp_div.c index a1bce1b7c09c..30cc7fa3ce37 100644 --- a/arch/mips/math-emu/dp_div.c +++ b/arch/mips/math-emu/dp_div.c @@ -26,7 +26,7 @@ #include "ieee754dp.h" -ieee754dp ieee754dp_div(ieee754dp x, ieee754dp y) +union ieee754dp ieee754dp_div(union ieee754dp x, union ieee754dp y) { COMPXDP; COMPYDP; diff --git a/arch/mips/math-emu/dp_fint.c b/arch/mips/math-emu/dp_fint.c index 88571288c9e0..60ed6ec7ddc7 100644 --- a/arch/mips/math-emu/dp_fint.c +++ b/arch/mips/math-emu/dp_fint.c @@ -26,7 +26,7 @@ #include "ieee754dp.h" -ieee754dp ieee754dp_fint(int x) +union ieee754dp ieee754dp_fint(int x) { u64 xm; int xe; @@ -70,7 +70,7 @@ ieee754dp ieee754dp_fint(int x) #endif } -ieee754dp ieee754dp_funs(unsigned int u) +union ieee754dp ieee754dp_funs(unsigned int u) { if ((int) u < 0) return ieee754dp_add(ieee754dp_1e31(), diff --git a/arch/mips/math-emu/dp_flong.c b/arch/mips/math-emu/dp_flong.c index 14fc01ec742d..2418f9d03055 100644 --- a/arch/mips/math-emu/dp_flong.c +++ b/arch/mips/math-emu/dp_flong.c @@ -26,7 +26,7 @@ #include "ieee754dp.h" -ieee754dp ieee754dp_flong(s64 x) +union ieee754dp ieee754dp_flong(s64 x) { u64 xm; int xe; @@ -68,7 +68,7 @@ ieee754dp ieee754dp_flong(s64 x) DPNORMRET1(xs, xe, xm, "dp_flong", x); } -ieee754dp ieee754dp_fulong(u64 u) +union ieee754dp ieee754dp_fulong(u64 u) { if ((s64) u < 0) return ieee754dp_add(ieee754dp_1e63(), diff --git a/arch/mips/math-emu/dp_frexp.c b/arch/mips/math-emu/dp_frexp.c index cb15a5eaecbb..6ab7df958362 100644 --- a/arch/mips/math-emu/dp_frexp.c +++ b/arch/mips/math-emu/dp_frexp.c @@ -28,7 +28,7 @@ /* close to ieeep754dp_logb */ -ieee754dp ieee754dp_frexp(ieee754dp x, int *eptr) +union ieee754dp ieee754dp_frexp(union ieee754dp x, int *eptr) { COMPXDP; CLEARCX; diff --git a/arch/mips/math-emu/dp_fsp.c b/arch/mips/math-emu/dp_fsp.c index daed6834dc15..d69cb1ad3f60 100644 --- a/arch/mips/math-emu/dp_fsp.c +++ b/arch/mips/math-emu/dp_fsp.c @@ -26,7 +26,7 @@ #include "ieee754dp.h" -ieee754dp ieee754dp_fsp(ieee754sp x) +union ieee754dp ieee754dp_fsp(union ieee754sp x) { COMPXSP; diff --git a/arch/mips/math-emu/dp_logb.c b/arch/mips/math-emu/dp_logb.c index 151127e59f5c..80116e2f331f 100644 --- a/arch/mips/math-emu/dp_logb.c +++ b/arch/mips/math-emu/dp_logb.c @@ -26,7 +26,7 @@ #include "ieee754dp.h" -ieee754dp ieee754dp_logb(ieee754dp x) +union ieee754dp ieee754dp_logb(union ieee754dp x) { COMPXDP; diff --git a/arch/mips/math-emu/dp_modf.c b/arch/mips/math-emu/dp_modf.c index b01f9cf6d402..cbc1386cdfca 100644 --- a/arch/mips/math-emu/dp_modf.c +++ b/arch/mips/math-emu/dp_modf.c @@ -28,7 +28,7 @@ /* modf function is always exact for a finite number */ -ieee754dp ieee754dp_modf(ieee754dp x, ieee754dp *ip) +union ieee754dp ieee754dp_modf(union ieee754dp x, union ieee754dp *ip) { COMPXDP; diff --git a/arch/mips/math-emu/dp_mul.c b/arch/mips/math-emu/dp_mul.c index 09175f461920..c4cad69c377e 100644 --- a/arch/mips/math-emu/dp_mul.c +++ b/arch/mips/math-emu/dp_mul.c @@ -26,7 +26,7 @@ #include "ieee754dp.h" -ieee754dp ieee754dp_mul(ieee754dp x, ieee754dp y) +union ieee754dp ieee754dp_mul(union ieee754dp x, union ieee754dp y) { COMPXDP; COMPYDP; diff --git a/arch/mips/math-emu/dp_scalb.c b/arch/mips/math-emu/dp_scalb.c index 6f5df438dda8..4f8b65622942 100644 --- a/arch/mips/math-emu/dp_scalb.c +++ b/arch/mips/math-emu/dp_scalb.c @@ -26,7 +26,7 @@ #include "ieee754dp.h" -ieee754dp ieee754dp_scalb(ieee754dp x, int n) +union ieee754dp ieee754dp_scalb(union ieee754dp x, int n) { COMPXDP; @@ -51,7 +51,7 @@ ieee754dp ieee754dp_scalb(ieee754dp x, int n) } -ieee754dp ieee754dp_ldexp(ieee754dp x, int n) +union ieee754dp ieee754dp_ldexp(union ieee754dp x, int n) { return ieee754dp_scalb(x, n); } diff --git a/arch/mips/math-emu/dp_simple.c b/arch/mips/math-emu/dp_simple.c index 79ce2673a714..b341cc83eeb0 100644 --- a/arch/mips/math-emu/dp_simple.c +++ b/arch/mips/math-emu/dp_simple.c @@ -26,12 +26,12 @@ #include "ieee754dp.h" -int ieee754dp_finite(ieee754dp x) +int ieee754dp_finite(union ieee754dp x) { return DPBEXP(x) != DP_EMAX + 1 + DP_EBIAS; } -ieee754dp ieee754dp_copysign(ieee754dp x, ieee754dp y) +union ieee754dp ieee754dp_copysign(union ieee754dp x, union ieee754dp y) { CLEARCX; DPSIGN(x) = DPSIGN(y); @@ -39,7 +39,7 @@ ieee754dp ieee754dp_copysign(ieee754dp x, ieee754dp y) } -ieee754dp ieee754dp_neg(ieee754dp x) +union ieee754dp ieee754dp_neg(union ieee754dp x) { COMPXDP; @@ -55,7 +55,7 @@ ieee754dp ieee754dp_neg(ieee754dp x) DPSIGN(x) ^= 1; if (xc == IEEE754_CLASS_SNAN) { - ieee754dp y = ieee754dp_indef(); + union ieee754dp y = ieee754dp_indef(); SETCX(IEEE754_INVALID_OPERATION); DPSIGN(y) = DPSIGN(x); return ieee754dp_nanxcpt(y, "neg"); @@ -65,7 +65,7 @@ ieee754dp ieee754dp_neg(ieee754dp x) } -ieee754dp ieee754dp_abs(ieee754dp x) +union ieee754dp ieee754dp_abs(union ieee754dp x) { COMPXDP; diff --git a/arch/mips/math-emu/dp_sqrt.c b/arch/mips/math-emu/dp_sqrt.c index b874d60a942b..cee9f3c2700d 100644 --- a/arch/mips/math-emu/dp_sqrt.c +++ b/arch/mips/math-emu/dp_sqrt.c @@ -34,10 +34,10 @@ static const unsigned table[] = { 1742, 661, 130 }; -ieee754dp ieee754dp_sqrt(ieee754dp x) +union ieee754dp ieee754dp_sqrt(union ieee754dp x) { struct _ieee754_csr oldcsr; - ieee754dp y, z, t; + union ieee754dp y, z, t; unsigned scalx, yh; COMPXDP; diff --git a/arch/mips/math-emu/dp_sub.c b/arch/mips/math-emu/dp_sub.c index 91e0a4b5cbc7..1e8f19ae6cd5 100644 --- a/arch/mips/math-emu/dp_sub.c +++ b/arch/mips/math-emu/dp_sub.c @@ -26,7 +26,7 @@ #include "ieee754dp.h" -ieee754dp ieee754dp_sub(ieee754dp x, ieee754dp y) +union ieee754dp ieee754dp_sub(union ieee754dp x, union ieee754dp y) { COMPXDP; COMPYDP; diff --git a/arch/mips/math-emu/dp_tint.c b/arch/mips/math-emu/dp_tint.c index 0ebe8598b94a..2a00805fdbeb 100644 --- a/arch/mips/math-emu/dp_tint.c +++ b/arch/mips/math-emu/dp_tint.c @@ -27,7 +27,7 @@ #include <linux/kernel.h> #include "ieee754dp.h" -int ieee754dp_tint(ieee754dp x) +int ieee754dp_tint(union ieee754dp x) { COMPXDP; @@ -109,9 +109,9 @@ int ieee754dp_tint(ieee754dp x) } -unsigned int ieee754dp_tuns(ieee754dp x) +unsigned int ieee754dp_tuns(union ieee754dp x) { - ieee754dp hb = ieee754dp_1e31(); + union ieee754dp hb = ieee754dp_1e31(); /* what if x < 0 ?? */ if (ieee754dp_lt(x, hb)) diff --git a/arch/mips/math-emu/dp_tlong.c b/arch/mips/math-emu/dp_tlong.c index 133ce2ba0012..3366399eebe8 100644 --- a/arch/mips/math-emu/dp_tlong.c +++ b/arch/mips/math-emu/dp_tlong.c @@ -26,7 +26,7 @@ #include "ieee754dp.h" -s64 ieee754dp_tlong(ieee754dp x) +s64 ieee754dp_tlong(union ieee754dp x) { COMPXDP; @@ -112,9 +112,9 @@ s64 ieee754dp_tlong(ieee754dp x) } -u64 ieee754dp_tulong(ieee754dp x) +u64 ieee754dp_tulong(union ieee754dp x) { - ieee754dp hb = ieee754dp_1e63(); + union ieee754dp hb = ieee754dp_1e63(); /* what if x < 0 ?? */ if (ieee754dp_lt(x, hb)) diff --git a/arch/mips/math-emu/ieee754.h b/arch/mips/math-emu/ieee754.h index 9e8c26e850fe..05705fa785c3 100644 --- a/arch/mips/math-emu/ieee754.h +++ b/arch/mips/math-emu/ieee754.h @@ -46,7 +46,7 @@ struct ieee754dp_const { ;)))) }; -typedef union _ieee754dp { +union ieee754dp { struct ieee754dp_const oparts; struct { __BITFIELD_FIELD(unsigned int sign:1, @@ -56,7 +56,7 @@ typedef union _ieee754dp { } parts; double d; u64 bits; -} ieee754dp; +}; struct ieee754sp_const { __BITFIELD_FIELD(unsigned sign:1, @@ -65,106 +65,106 @@ struct ieee754sp_const { ;))) }; -typedef union _ieee754sp { +union ieee754sp { struct ieee754sp_const parts; float f; u32 bits; -} ieee754sp; +}; /* * single precision (often aka float) */ -int ieee754sp_finite(ieee754sp x); -int ieee754sp_class(ieee754sp x); +int ieee754sp_finite(union ieee754sp x); +int ieee754sp_class(union ieee754sp x); -ieee754sp ieee754sp_abs(ieee754sp x); -ieee754sp ieee754sp_neg(ieee754sp x); -ieee754sp ieee754sp_scalb(ieee754sp x, int); -ieee754sp ieee754sp_logb(ieee754sp x); +union ieee754sp ieee754sp_abs(union ieee754sp x); +union ieee754sp ieee754sp_neg(union ieee754sp x); +union ieee754sp ieee754sp_scalb(union ieee754sp x, int); +union ieee754sp ieee754sp_logb(union ieee754sp x); /* x with sign of y */ -ieee754sp ieee754sp_copysign(ieee754sp x, ieee754sp y); +union ieee754sp ieee754sp_copysign(union ieee754sp x, union ieee754sp y); -ieee754sp ieee754sp_add(ieee754sp x, ieee754sp y); -ieee754sp ieee754sp_sub(ieee754sp x, ieee754sp y); -ieee754sp ieee754sp_mul(ieee754sp x, ieee754sp y); -ieee754sp ieee754sp_div(ieee754sp x, ieee754sp y); +union ieee754sp ieee754sp_add(union ieee754sp x, union ieee754sp y); +union ieee754sp ieee754sp_sub(union ieee754sp x, union ieee754sp y); +union ieee754sp ieee754sp_mul(union ieee754sp x, union ieee754sp y); +union ieee754sp ieee754sp_div(union ieee754sp x, union ieee754sp y); -ieee754sp ieee754sp_fint(int x); -ieee754sp ieee754sp_funs(unsigned x); -ieee754sp ieee754sp_flong(s64 x); -ieee754sp ieee754sp_fulong(u64 x); -ieee754sp ieee754sp_fdp(ieee754dp x); +union ieee754sp ieee754sp_fint(int x); +union ieee754sp ieee754sp_funs(unsigned x); +union ieee754sp ieee754sp_flong(s64 x); +union ieee754sp ieee754sp_fulong(u64 x); +union ieee754sp ieee754sp_fdp(union ieee754dp x); -int ieee754sp_tint(ieee754sp x); -unsigned int ieee754sp_tuns(ieee754sp x); -s64 ieee754sp_tlong(ieee754sp x); -u64 ieee754sp_tulong(ieee754sp x); +int ieee754sp_tint(union ieee754sp x); +unsigned int ieee754sp_tuns(union ieee754sp x); +s64 ieee754sp_tlong(union ieee754sp x); +u64 ieee754sp_tulong(union ieee754sp x); -int ieee754sp_cmp(ieee754sp x, ieee754sp y, int cop, int sig); +int ieee754sp_cmp(union ieee754sp x, union ieee754sp y, int cop, int sig); /* * basic sp math */ -ieee754sp ieee754sp_modf(ieee754sp x, ieee754sp * ip); -ieee754sp ieee754sp_frexp(ieee754sp x, int *exp); -ieee754sp ieee754sp_ldexp(ieee754sp x, int exp); +union ieee754sp ieee754sp_modf(union ieee754sp x, union ieee754sp * ip); +union ieee754sp ieee754sp_frexp(union ieee754sp x, int *exp); +union ieee754sp ieee754sp_ldexp(union ieee754sp x, int exp); -ieee754sp ieee754sp_ceil(ieee754sp x); -ieee754sp ieee754sp_floor(ieee754sp x); -ieee754sp ieee754sp_trunc(ieee754sp x); +union ieee754sp ieee754sp_ceil(union ieee754sp x); +union ieee754sp ieee754sp_floor(union ieee754sp x); +union ieee754sp ieee754sp_trunc(union ieee754sp x); -ieee754sp ieee754sp_sqrt(ieee754sp x); +union ieee754sp ieee754sp_sqrt(union ieee754sp x); /* * double precision (often aka double) */ -int ieee754dp_finite(ieee754dp x); -int ieee754dp_class(ieee754dp x); +int ieee754dp_finite(union ieee754dp x); +int ieee754dp_class(union ieee754dp x); /* x with sign of y */ -ieee754dp ieee754dp_copysign(ieee754dp x, ieee754dp y); +union ieee754dp ieee754dp_copysign(union ieee754dp x, union ieee754dp y); -ieee754dp ieee754dp_add(ieee754dp x, ieee754dp y); -ieee754dp ieee754dp_sub(ieee754dp x, ieee754dp y); -ieee754dp ieee754dp_mul(ieee754dp x, ieee754dp y); -ieee754dp ieee754dp_div(ieee754dp x, ieee754dp y); +union ieee754dp ieee754dp_add(union ieee754dp x, union ieee754dp y); +union ieee754dp ieee754dp_sub(union ieee754dp x, union ieee754dp y); +union ieee754dp ieee754dp_mul(union ieee754dp x, union ieee754dp y); +union ieee754dp ieee754dp_div(union ieee754dp x, union ieee754dp y); -ieee754dp ieee754dp_abs(ieee754dp x); -ieee754dp ieee754dp_neg(ieee754dp x); -ieee754dp ieee754dp_scalb(ieee754dp x, int); +union ieee754dp ieee754dp_abs(union ieee754dp x); +union ieee754dp ieee754dp_neg(union ieee754dp x); +union ieee754dp ieee754dp_scalb(union ieee754dp x, int); /* return exponent as integer in floating point format */ -ieee754dp ieee754dp_logb(ieee754dp x); +union ieee754dp ieee754dp_logb(union ieee754dp x); -ieee754dp ieee754dp_fint(int x); -ieee754dp ieee754dp_funs(unsigned x); -ieee754dp ieee754dp_flong(s64 x); -ieee754dp ieee754dp_fulong(u64 x); -ieee754dp ieee754dp_fsp(ieee754sp x); +union ieee754dp ieee754dp_fint(int x); +union ieee754dp ieee754dp_funs(unsigned x); +union ieee754dp ieee754dp_flong(s64 x); +union ieee754dp ieee754dp_fulong(u64 x); +union ieee754dp ieee754dp_fsp(union ieee754sp x); -ieee754dp ieee754dp_ceil(ieee754dp x); -ieee754dp ieee754dp_floor(ieee754dp x); -ieee754dp ieee754dp_trunc(ieee754dp x); +union ieee754dp ieee754dp_ceil(union ieee754dp x); +union ieee754dp ieee754dp_floor(union ieee754dp x); +union ieee754dp ieee754dp_trunc(union ieee754dp x); -int ieee754dp_tint(ieee754dp x); -unsigned int ieee754dp_tuns(ieee754dp x); -s64 ieee754dp_tlong(ieee754dp x); -u64 ieee754dp_tulong(ieee754dp x); +int ieee754dp_tint(union ieee754dp x); +unsigned int ieee754dp_tuns(union ieee754dp x); +s64 ieee754dp_tlong(union ieee754dp x); +u64 ieee754dp_tulong(union ieee754dp x); -int ieee754dp_cmp(ieee754dp x, ieee754dp y, int cop, int sig); +int ieee754dp_cmp(union ieee754dp x, union ieee754dp y, int cop, int sig); /* * basic sp math */ -ieee754dp ieee754dp_modf(ieee754dp x, ieee754dp * ip); -ieee754dp ieee754dp_frexp(ieee754dp x, int *exp); -ieee754dp ieee754dp_ldexp(ieee754dp x, int exp); +union ieee754dp ieee754dp_modf(union ieee754dp x, union ieee754dp * ip); +union ieee754dp ieee754dp_frexp(union ieee754dp x, int *exp); +union ieee754dp ieee754dp_ldexp(union ieee754dp x, int exp); -ieee754dp ieee754dp_ceil(ieee754dp x); -ieee754dp ieee754dp_floor(ieee754dp x); -ieee754dp ieee754dp_trunc(ieee754dp x); +union ieee754dp ieee754dp_ceil(union ieee754dp x); +union ieee754dp ieee754dp_floor(union ieee754dp x); +union ieee754dp ieee754dp_trunc(union ieee754dp x); -ieee754dp ieee754dp_sqrt(ieee754dp x); +union ieee754dp ieee754dp_sqrt(union ieee754dp x); @@ -204,65 +204,65 @@ ieee754dp ieee754dp_sqrt(ieee754dp x); /* "normal" comparisons */ -static inline int ieee754sp_eq(ieee754sp x, ieee754sp y) +static inline int ieee754sp_eq(union ieee754sp x, union ieee754sp y) { return ieee754sp_cmp(x, y, IEEE754_CEQ, 0); } -static inline int ieee754sp_ne(ieee754sp x, ieee754sp y) +static inline int ieee754sp_ne(union ieee754sp x, union ieee754sp y) { return ieee754sp_cmp(x, y, IEEE754_CLT | IEEE754_CGT | IEEE754_CUN, 0); } -static inline int ieee754sp_lt(ieee754sp x, ieee754sp y) +static inline int ieee754sp_lt(union ieee754sp x, union ieee754sp y) { return ieee754sp_cmp(x, y, IEEE754_CLT, 0); } -static inline int ieee754sp_le(ieee754sp x, ieee754sp y) +static inline int ieee754sp_le(union ieee754sp x, union ieee754sp y) { return ieee754sp_cmp(x, y, IEEE754_CLT | IEEE754_CEQ, 0); } -static inline int ieee754sp_gt(ieee754sp x, ieee754sp y) +static inline int ieee754sp_gt(union ieee754sp x, union ieee754sp y) { return ieee754sp_cmp(x, y, IEEE754_CGT, 0); } -static inline int ieee754sp_ge(ieee754sp x, ieee754sp y) +static inline int ieee754sp_ge(union ieee754sp x, union ieee754sp y) { return ieee754sp_cmp(x, y, IEEE754_CGT | IEEE754_CEQ, 0); } -static inline int ieee754dp_eq(ieee754dp x, ieee754dp y) +static inline int ieee754dp_eq(union ieee754dp x, union ieee754dp y) { return ieee754dp_cmp(x, y, IEEE754_CEQ, 0); } -static inline int ieee754dp_ne(ieee754dp x, ieee754dp y) +static inline int ieee754dp_ne(union ieee754dp x, union ieee754dp y) { return ieee754dp_cmp(x, y, IEEE754_CLT | IEEE754_CGT | IEEE754_CUN, 0); } -static inline int ieee754dp_lt(ieee754dp x, ieee754dp y) +static inline int ieee754dp_lt(union ieee754dp x, union ieee754dp y) { return ieee754dp_cmp(x, y, IEEE754_CLT, 0); } -static inline int ieee754dp_le(ieee754dp x, ieee754dp y) +static inline int ieee754dp_le(union ieee754dp x, union ieee754dp y) { return ieee754dp_cmp(x, y, IEEE754_CLT | IEEE754_CEQ, 0); } -static inline int ieee754dp_gt(ieee754dp x, ieee754dp y) +static inline int ieee754dp_gt(union ieee754dp x, union ieee754dp y) { return ieee754dp_cmp(x, y, IEEE754_CGT, 0); } -static inline int ieee754dp_ge(ieee754dp x, ieee754dp y) +static inline int ieee754dp_ge(union ieee754dp x, union ieee754dp y) { return ieee754dp_cmp(x, y, IEEE754_CGT | IEEE754_CEQ, 0); } @@ -271,8 +271,8 @@ static inline int ieee754dp_ge(ieee754dp x, ieee754dp y) /* * Like strtod */ -ieee754dp ieee754dp_fstr(const char *s, char **endp); -char *ieee754dp_tstr(ieee754dp x, int prec, int fmt, int af); +union ieee754dp ieee754dp_fstr(const char *s, char **endp); +char *ieee754dp_tstr(union ieee754dp x, int prec, int fmt, int af); /* @@ -338,8 +338,8 @@ static inline int ieee754_sxtest(unsigned n) } /* debugging */ -ieee754sp ieee754sp_dump(char *s, ieee754sp x); -ieee754dp ieee754dp_dump(char *s, ieee754dp x); +union ieee754sp ieee754sp_dump(char *s, union ieee754sp x); +union ieee754dp ieee754dp_dump(char *s, union ieee754dp x); #define IEEE754_SPCVAL_PZERO 0 #define IEEE754_SPCVAL_NZERO 1 @@ -361,8 +361,8 @@ ieee754dp ieee754dp_dump(char *s, ieee754dp x); extern const struct ieee754dp_const __ieee754dp_spcvals[]; extern const struct ieee754sp_const __ieee754sp_spcvals[]; -#define ieee754dp_spcvals ((const ieee754dp *)__ieee754dp_spcvals) -#define ieee754sp_spcvals ((const ieee754sp *)__ieee754sp_spcvals) +#define ieee754dp_spcvals ((const union ieee754dp *)__ieee754dp_spcvals) +#define ieee754sp_spcvals ((const union ieee754sp *)__ieee754sp_spcvals) /* * Return infinity with given sign @@ -404,8 +404,8 @@ struct ieee754xctx { const char *op; /* operation name */ int rt; /* result type */ union { - ieee754sp sp; /* single precision */ - ieee754dp dp; /* double precision */ + union ieee754sp sp; /* single precision */ + union ieee754dp dp; /* double precision */ #ifdef IEEE854_XP ieee754xp xp; /* extended precision */ #endif diff --git a/arch/mips/math-emu/ieee754d.c b/arch/mips/math-emu/ieee754d.c index 9599bdd32585..627932839d57 100644 --- a/arch/mips/math-emu/ieee754d.c +++ b/arch/mips/math-emu/ieee754d.c @@ -56,7 +56,7 @@ #define DPBEXP(dp) (dp.parts.bexp) #define DPMANT(dp) (dp.parts.mant) -ieee754dp ieee754dp_dump(char *m, ieee754dp x) +union ieee754dp ieee754dp_dump(char *m, union ieee754dp x) { int i; @@ -96,7 +96,7 @@ ieee754dp ieee754dp_dump(char *m, ieee754dp x) return x; } -ieee754sp ieee754sp_dump(char *m, ieee754sp x) +union ieee754sp ieee754sp_dump(char *m, union ieee754sp x) { int i; diff --git a/arch/mips/math-emu/ieee754dp.c b/arch/mips/math-emu/ieee754dp.c index df59d16bd4fd..3692362b8072 100644 --- a/arch/mips/math-emu/ieee754dp.c +++ b/arch/mips/math-emu/ieee754dp.c @@ -27,26 +27,26 @@ #include "ieee754dp.h" -int ieee754dp_class(ieee754dp x) +int ieee754dp_class(union ieee754dp x) { COMPXDP; EXPLODEXDP; return xc; } -int ieee754dp_isnan(ieee754dp x) +int ieee754dp_isnan(union ieee754dp x) { return ieee754dp_class(x) >= IEEE754_CLASS_SNAN; } -int ieee754dp_issnan(ieee754dp x) +int ieee754dp_issnan(union ieee754dp x) { assert(ieee754dp_isnan(x)); return ((DPMANT(x) & DP_MBIT(DP_MBITS-1)) == DP_MBIT(DP_MBITS-1)); } -ieee754dp __cold ieee754dp_xcpt(ieee754dp r, const char *op, ...) +union ieee754dp __cold ieee754dp_xcpt(union ieee754dp r, const char *op, ...) { struct ieee754xctx ax; if (!TSTX()) @@ -61,7 +61,7 @@ ieee754dp __cold ieee754dp_xcpt(ieee754dp r, const char *op, ...) return ax.rv.dp; } -ieee754dp __cold ieee754dp_nanxcpt(ieee754dp r, const char *op, ...) +union ieee754dp __cold ieee754dp_nanxcpt(union ieee754dp r, const char *op, ...) { struct ieee754xctx ax; @@ -88,7 +88,7 @@ ieee754dp __cold ieee754dp_nanxcpt(ieee754dp r, const char *op, ...) return ax.rv.dp; } -ieee754dp ieee754dp_bestnan(ieee754dp x, ieee754dp y) +union ieee754dp ieee754dp_bestnan(union ieee754dp x, union ieee754dp y) { assert(ieee754dp_isnan(x)); assert(ieee754dp_isnan(y)); @@ -131,7 +131,7 @@ static u64 get_rounding(int sn, u64 xm) * xe is an unbiased exponent * xm is 3bit extended precision value. */ -ieee754dp ieee754dp_format(int sn, int xe, u64 xm) +union ieee754dp ieee754dp_format(int sn, int xe, u64 xm) { assert(xm); /* we don't gen exact zeros (probably should) */ diff --git a/arch/mips/math-emu/ieee754dp.h b/arch/mips/math-emu/ieee754dp.h index ce2af5b04b48..ad2568fa0b05 100644 --- a/arch/mips/math-emu/ieee754dp.h +++ b/arch/mips/math-emu/ieee754dp.h @@ -46,9 +46,9 @@ #define DPDNORMX DPDNORMx(xm, xe) #define DPDNORMY DPDNORMx(ym, ye) -static inline ieee754dp builddp(int s, int bx, u64 m) +static inline union ieee754dp builddp(int s, int bx, u64 m) { - ieee754dp r; + union ieee754dp r; assert((s) == 0 || (s) == 1); assert((bx) >= DP_EMIN - 1 + DP_EBIAS @@ -61,19 +61,19 @@ static inline ieee754dp builddp(int s, int bx, u64 m) return r; } -extern int ieee754dp_isnan(ieee754dp); -extern int ieee754dp_issnan(ieee754dp); +extern int ieee754dp_isnan(union ieee754dp); +extern int ieee754dp_issnan(union ieee754dp); extern int __cold ieee754si_xcpt(int, const char *, ...); extern s64 __cold ieee754di_xcpt(s64, const char *, ...); -extern ieee754dp __cold ieee754dp_xcpt(ieee754dp, const char *, ...); -extern ieee754dp __cold ieee754dp_nanxcpt(ieee754dp, const char *, ...); -extern ieee754dp ieee754dp_bestnan(ieee754dp, ieee754dp); -extern ieee754dp ieee754dp_format(int, int, u64); +extern union ieee754dp __cold ieee754dp_xcpt(union ieee754dp, const char *, ...); +extern union ieee754dp __cold ieee754dp_nanxcpt(union ieee754dp, const char *, ...); +extern union ieee754dp ieee754dp_bestnan(union ieee754dp, union ieee754dp); +extern union ieee754dp ieee754dp_format(int, int, u64); #define DPNORMRET2(s, e, m, name, a0, a1) \ { \ - ieee754dp V = ieee754dp_format(s, e, m); \ + union ieee754dp V = ieee754dp_format(s, e, m); \ if(TSTX()) \ return ieee754dp_xcpt(V, name, a0, a1); \ else \ diff --git a/arch/mips/math-emu/ieee754m.c b/arch/mips/math-emu/ieee754m.c index 24190f3c9dd6..06224064333b 100644 --- a/arch/mips/math-emu/ieee754m.c +++ b/arch/mips/math-emu/ieee754m.c @@ -26,9 +26,9 @@ #include "ieee754.h" -ieee754dp ieee754dp_floor(ieee754dp x) +union ieee754dp ieee754dp_floor(union ieee754dp x) { - ieee754dp i; + union ieee754dp i; if (ieee754dp_lt(ieee754dp_modf(x, &i), ieee754dp_zero(0))) return ieee754dp_sub(i, ieee754dp_one(0)); @@ -36,9 +36,9 @@ ieee754dp ieee754dp_floor(ieee754dp x) return i; } -ieee754dp ieee754dp_ceil(ieee754dp x) +union ieee754dp ieee754dp_ceil(union ieee754dp x) { - ieee754dp i; + union ieee754dp i; if (ieee754dp_gt(ieee754dp_modf(x, &i), ieee754dp_zero(0))) return ieee754dp_add(i, ieee754dp_one(0)); @@ -46,9 +46,9 @@ ieee754dp ieee754dp_ceil(ieee754dp x) return i; } -ieee754dp ieee754dp_trunc(ieee754dp x) +union ieee754dp ieee754dp_trunc(union ieee754dp x) { - ieee754dp i; + union ieee754dp i; (void) ieee754dp_modf(x, &i); return i; diff --git a/arch/mips/math-emu/ieee754sp.c b/arch/mips/math-emu/ieee754sp.c index dd3ecd62e469..ac84d19e7c87 100644 --- a/arch/mips/math-emu/ieee754sp.c +++ b/arch/mips/math-emu/ieee754sp.c @@ -27,26 +27,26 @@ #include "ieee754sp.h" -int ieee754sp_class(ieee754sp x) +int ieee754sp_class(union ieee754sp x) { COMPXSP; EXPLODEXSP; return xc; } -int ieee754sp_isnan(ieee754sp x) +int ieee754sp_isnan(union ieee754sp x) { return ieee754sp_class(x) >= IEEE754_CLASS_SNAN; } -int ieee754sp_issnan(ieee754sp x) +int ieee754sp_issnan(union ieee754sp x) { assert(ieee754sp_isnan(x)); return (SPMANT(x) & SP_MBIT(SP_MBITS-1)); } -ieee754sp __cold ieee754sp_xcpt(ieee754sp r, const char *op, ...) +union ieee754sp __cold ieee754sp_xcpt(union ieee754sp r, const char *op, ...) { struct ieee754xctx ax; @@ -62,7 +62,7 @@ ieee754sp __cold ieee754sp_xcpt(ieee754sp r, const char *op, ...) return ax.rv.sp; } -ieee754sp __cold ieee754sp_nanxcpt(ieee754sp r, const char *op, ...) +union ieee754sp __cold ieee754sp_nanxcpt(union ieee754sp r, const char *op, ...) { struct ieee754xctx ax; @@ -89,7 +89,7 @@ ieee754sp __cold ieee754sp_nanxcpt(ieee754sp r, const char *op, ...) return ax.rv.sp; } -ieee754sp ieee754sp_bestnan(ieee754sp x, ieee754sp y) +union ieee754sp ieee754sp_bestnan(union ieee754sp x, union ieee754sp y) { assert(ieee754sp_isnan(x)); assert(ieee754sp_isnan(y)); @@ -132,7 +132,7 @@ static unsigned get_rounding(int sn, unsigned xm) * xe is an unbiased exponent * xm is 3bit extended precision value. */ -ieee754sp ieee754sp_format(int sn, int xe, unsigned xm) +union ieee754sp ieee754sp_format(int sn, int xe, unsigned xm) { assert(xm); /* we don't gen exact zeros (probably should) */ diff --git a/arch/mips/math-emu/ieee754sp.h b/arch/mips/math-emu/ieee754sp.h index e3933bed0be4..5836fa1e69d8 100644 --- a/arch/mips/math-emu/ieee754sp.h +++ b/arch/mips/math-emu/ieee754sp.h @@ -51,9 +51,9 @@ #define SPDNORMX SPDNORMx(xm, xe) #define SPDNORMY SPDNORMx(ym, ye) -static inline ieee754sp buildsp(int s, int bx, unsigned m) +static inline union ieee754sp buildsp(int s, int bx, unsigned m) { - ieee754sp r; + union ieee754sp r; assert((s) == 0 || (s) == 1); assert((bx) >= SP_EMIN - 1 + SP_EBIAS @@ -67,19 +67,19 @@ static inline ieee754sp buildsp(int s, int bx, unsigned m) return r; } -extern int ieee754sp_isnan(ieee754sp); -extern int ieee754sp_issnan(ieee754sp); +extern int ieee754sp_isnan(union ieee754sp); +extern int ieee754sp_issnan(union ieee754sp); extern int __cold ieee754si_xcpt(int, const char *, ...); extern s64 __cold ieee754di_xcpt(s64, const char *, ...); -extern ieee754sp __cold ieee754sp_xcpt(ieee754sp, const char *, ...); -extern ieee754sp __cold ieee754sp_nanxcpt(ieee754sp, const char *, ...); -extern ieee754sp ieee754sp_bestnan(ieee754sp, ieee754sp); -extern ieee754sp ieee754sp_format(int, int, unsigned); +extern union ieee754sp __cold ieee754sp_xcpt(union ieee754sp, const char *, ...); +extern union ieee754sp __cold ieee754sp_nanxcpt(union ieee754sp, const char *, ...); +extern union ieee754sp ieee754sp_bestnan(union ieee754sp, union ieee754sp); +extern union ieee754sp ieee754sp_format(int, int, unsigned); #define SPNORMRET2(s, e, m, name, a0, a1) \ { \ - ieee754sp V = ieee754sp_format(s, e, m); \ + union ieee754sp V = ieee754sp_format(s, e, m); \ if(TSTX()) \ return ieee754sp_xcpt(V, name, a0, a1); \ else \ diff --git a/arch/mips/math-emu/sp_add.c b/arch/mips/math-emu/sp_add.c index c446e64637e2..4938d8f1d4bc 100644 --- a/arch/mips/math-emu/sp_add.c +++ b/arch/mips/math-emu/sp_add.c @@ -26,7 +26,7 @@ #include "ieee754sp.h" -ieee754sp ieee754sp_add(ieee754sp x, ieee754sp y) +union ieee754sp ieee754sp_add(union ieee754sp x, union ieee754sp y) { COMPXSP; COMPYSP; diff --git a/arch/mips/math-emu/sp_cmp.c b/arch/mips/math-emu/sp_cmp.c index 716cf37e2465..b98d68617cfe 100644 --- a/arch/mips/math-emu/sp_cmp.c +++ b/arch/mips/math-emu/sp_cmp.c @@ -26,7 +26,7 @@ #include "ieee754sp.h" -int ieee754sp_cmp(ieee754sp x, ieee754sp y, int cmp, int sig) +int ieee754sp_cmp(union ieee754sp x, union ieee754sp y, int cmp, int sig) { COMPXSP; COMPYSP; diff --git a/arch/mips/math-emu/sp_div.c b/arch/mips/math-emu/sp_div.c index d7747928c954..1f62865ffcbd 100644 --- a/arch/mips/math-emu/sp_div.c +++ b/arch/mips/math-emu/sp_div.c @@ -26,7 +26,7 @@ #include "ieee754sp.h" -ieee754sp ieee754sp_div(ieee754sp x, ieee754sp y) +union ieee754sp ieee754sp_div(union ieee754sp x, union ieee754sp y) { COMPXSP; COMPYSP; diff --git a/arch/mips/math-emu/sp_fdp.c b/arch/mips/math-emu/sp_fdp.c index e1515aae0166..cbefb88a14ef 100644 --- a/arch/mips/math-emu/sp_fdp.c +++ b/arch/mips/math-emu/sp_fdp.c @@ -26,10 +26,10 @@ #include "ieee754sp.h" -ieee754sp ieee754sp_fdp(ieee754dp x) +union ieee754sp ieee754sp_fdp(union ieee754dp x) { COMPXDP; - ieee754sp nan; + union ieee754sp nan; EXPLODEXDP; diff --git a/arch/mips/math-emu/sp_fint.c b/arch/mips/math-emu/sp_fint.c index 9694d6c016cb..7ba2b40348c4 100644 --- a/arch/mips/math-emu/sp_fint.c +++ b/arch/mips/math-emu/sp_fint.c @@ -26,7 +26,7 @@ #include "ieee754sp.h" -ieee754sp ieee754sp_fint(int x) +union ieee754sp ieee754sp_fint(int x) { unsigned xm; int xe; @@ -70,7 +70,7 @@ ieee754sp ieee754sp_fint(int x) } -ieee754sp ieee754sp_funs(unsigned int u) +union ieee754sp ieee754sp_funs(unsigned int u) { if ((int) u < 0) return ieee754sp_add(ieee754sp_1e31(), diff --git a/arch/mips/math-emu/sp_flong.c b/arch/mips/math-emu/sp_flong.c index 16a651f29865..c457a9f8a148 100644 --- a/arch/mips/math-emu/sp_flong.c +++ b/arch/mips/math-emu/sp_flong.c @@ -26,7 +26,7 @@ #include "ieee754sp.h" -ieee754sp ieee754sp_flong(s64 x) +union ieee754sp ieee754sp_flong(s64 x) { u64 xm; /* <--- need 64-bit mantissa temp */ int xe; @@ -69,7 +69,7 @@ ieee754sp ieee754sp_flong(s64 x) } -ieee754sp ieee754sp_fulong(u64 u) +union ieee754sp ieee754sp_fulong(u64 u) { if ((s64) u < 0) return ieee754sp_add(ieee754sp_1e63(), diff --git a/arch/mips/math-emu/sp_frexp.c b/arch/mips/math-emu/sp_frexp.c index 5bc993c30044..668252bca513 100644 --- a/arch/mips/math-emu/sp_frexp.c +++ b/arch/mips/math-emu/sp_frexp.c @@ -28,7 +28,7 @@ /* close to ieeep754sp_logb */ -ieee754sp ieee754sp_frexp(ieee754sp x, int *eptr) +union ieee754sp ieee754sp_frexp(union ieee754sp x, int *eptr) { COMPXSP; CLEARCX; diff --git a/arch/mips/math-emu/sp_logb.c b/arch/mips/math-emu/sp_logb.c index 9c14e0c75bd2..4dfe5386e89d 100644 --- a/arch/mips/math-emu/sp_logb.c +++ b/arch/mips/math-emu/sp_logb.c @@ -26,7 +26,7 @@ #include "ieee754sp.h" -ieee754sp ieee754sp_logb(ieee754sp x) +union ieee754sp ieee754sp_logb(union ieee754sp x) { COMPXSP; diff --git a/arch/mips/math-emu/sp_modf.c b/arch/mips/math-emu/sp_modf.c index 25a0fbaa0556..30d53ec1f7eb 100644 --- a/arch/mips/math-emu/sp_modf.c +++ b/arch/mips/math-emu/sp_modf.c @@ -28,7 +28,7 @@ /* modf function is always exact for a finite number */ -ieee754sp ieee754sp_modf(ieee754sp x, ieee754sp *ip) +union ieee754sp ieee754sp_modf(union ieee754sp x, union ieee754sp *ip) { COMPXSP; diff --git a/arch/mips/math-emu/sp_mul.c b/arch/mips/math-emu/sp_mul.c index fa4675cf2aad..c628f3c495dc 100644 --- a/arch/mips/math-emu/sp_mul.c +++ b/arch/mips/math-emu/sp_mul.c @@ -26,7 +26,7 @@ #include "ieee754sp.h" -ieee754sp ieee754sp_mul(ieee754sp x, ieee754sp y) +union ieee754sp ieee754sp_mul(union ieee754sp x, union ieee754sp y) { COMPXSP; COMPYSP; diff --git a/arch/mips/math-emu/sp_scalb.c b/arch/mips/math-emu/sp_scalb.c index dd76196984c8..9831d428af6f 100644 --- a/arch/mips/math-emu/sp_scalb.c +++ b/arch/mips/math-emu/sp_scalb.c @@ -26,7 +26,7 @@ #include "ieee754sp.h" -ieee754sp ieee754sp_scalb(ieee754sp x, int n) +union ieee754sp ieee754sp_scalb(union ieee754sp x, int n) { COMPXSP; @@ -51,7 +51,7 @@ ieee754sp ieee754sp_scalb(ieee754sp x, int n) } -ieee754sp ieee754sp_ldexp(ieee754sp x, int n) +union ieee754sp ieee754sp_ldexp(union ieee754sp x, int n) { return ieee754sp_scalb(x, n); } diff --git a/arch/mips/math-emu/sp_simple.c b/arch/mips/math-emu/sp_simple.c index ae4fcfafd853..633c7a54cf1e 100644 --- a/arch/mips/math-emu/sp_simple.c +++ b/arch/mips/math-emu/sp_simple.c @@ -26,12 +26,12 @@ #include "ieee754sp.h" -int ieee754sp_finite(ieee754sp x) +int ieee754sp_finite(union ieee754sp x) { return SPBEXP(x) != SP_EMAX + 1 + SP_EBIAS; } -ieee754sp ieee754sp_copysign(ieee754sp x, ieee754sp y) +union ieee754sp ieee754sp_copysign(union ieee754sp x, union ieee754sp y) { CLEARCX; SPSIGN(x) = SPSIGN(y); @@ -39,7 +39,7 @@ ieee754sp ieee754sp_copysign(ieee754sp x, ieee754sp y) } -ieee754sp ieee754sp_neg(ieee754sp x) +union ieee754sp ieee754sp_neg(union ieee754sp x) { COMPXSP; @@ -55,7 +55,7 @@ ieee754sp ieee754sp_neg(ieee754sp x) SPSIGN(x) ^= 1; if (xc == IEEE754_CLASS_SNAN) { - ieee754sp y = ieee754sp_indef(); + union ieee754sp y = ieee754sp_indef(); SETCX(IEEE754_INVALID_OPERATION); SPSIGN(y) = SPSIGN(x); return ieee754sp_nanxcpt(y, "neg"); @@ -65,7 +65,7 @@ ieee754sp ieee754sp_neg(ieee754sp x) } -ieee754sp ieee754sp_abs(ieee754sp x) +union ieee754sp ieee754sp_abs(union ieee754sp x) { COMPXSP; diff --git a/arch/mips/math-emu/sp_sqrt.c b/arch/mips/math-emu/sp_sqrt.c index fed20175f5fb..4c60d91961f4 100644 --- a/arch/mips/math-emu/sp_sqrt.c +++ b/arch/mips/math-emu/sp_sqrt.c @@ -26,7 +26,7 @@ #include "ieee754sp.h" -ieee754sp ieee754sp_sqrt(ieee754sp x) +union ieee754sp ieee754sp_sqrt(union ieee754sp x) { int ix, s, q, m, t, i; unsigned int r; diff --git a/arch/mips/math-emu/sp_sub.c b/arch/mips/math-emu/sp_sub.c index e595c6f3d0bb..ed67acfb114f 100644 --- a/arch/mips/math-emu/sp_sub.c +++ b/arch/mips/math-emu/sp_sub.c @@ -26,7 +26,7 @@ #include "ieee754sp.h" -ieee754sp ieee754sp_sub(ieee754sp x, ieee754sp y) +union ieee754sp ieee754sp_sub(union ieee754sp x, union ieee754sp y) { COMPXSP; COMPYSP; diff --git a/arch/mips/math-emu/sp_tint.c b/arch/mips/math-emu/sp_tint.c index 0fe9acc7716e..37cb096ee931 100644 --- a/arch/mips/math-emu/sp_tint.c +++ b/arch/mips/math-emu/sp_tint.c @@ -27,7 +27,7 @@ #include <linux/kernel.h> #include "ieee754sp.h" -int ieee754sp_tint(ieee754sp x) +int ieee754sp_tint(union ieee754sp x) { COMPXSP; @@ -113,9 +113,9 @@ int ieee754sp_tint(ieee754sp x) } -unsigned int ieee754sp_tuns(ieee754sp x) +unsigned int ieee754sp_tuns(union ieee754sp x) { - ieee754sp hb = ieee754sp_1e31(); + union ieee754sp hb = ieee754sp_1e31(); /* what if x < 0 ?? */ if (ieee754sp_lt(x, hb)) diff --git a/arch/mips/math-emu/sp_tlong.c b/arch/mips/math-emu/sp_tlong.c index d0ca6e22be29..da412d38d5ef 100644 --- a/arch/mips/math-emu/sp_tlong.c +++ b/arch/mips/math-emu/sp_tlong.c @@ -26,7 +26,7 @@ #include "ieee754sp.h" -s64 ieee754sp_tlong(ieee754sp x) +s64 ieee754sp_tlong(union ieee754sp x) { COMPXDP; /* <-- need 64-bit mantissa tmp */ @@ -108,9 +108,9 @@ s64 ieee754sp_tlong(ieee754sp x) } -u64 ieee754sp_tulong(ieee754sp x) +u64 ieee754sp_tulong(union ieee754sp x) { - ieee754sp hb = ieee754sp_1e63(); + union ieee754sp hb = ieee754sp_1e63(); /* what if x < 0 ?? */ if (ieee754sp_lt(x, hb)) |