diff --git a/arch/mips/math-emu/Makefile b/arch/mips/math-emu/Makefile index 016736ed304cf0bc79bea683dd0baf174496dd12..383cc78897747c276919e1ce0b686d07c2aa7f41 100644 --- a/arch/mips/math-emu/Makefile +++ b/arch/mips/math-emu/Makefile @@ -2,8 +2,8 @@ # Makefile for the Linux/MIPS kernel FPU emulation. # -obj-y += cp1emu.o ieee754dp.o ieee754sp.o ieee754.o ieee754xcpt.o dp_div.o \ - dp_mul.o dp_sub.o dp_add.o dp_fsp.o dp_cmp.o dp_simple.o dp_tint.o \ +obj-y += cp1emu.o ieee754dp.o ieee754sp.o ieee754.o dp_div.o dp_mul.o \ + dp_sub.o dp_add.o dp_fsp.o dp_cmp.o dp_simple.o dp_tint.o \ dp_fint.o dp_tlong.o dp_flong.o sp_div.o sp_mul.o sp_sub.o \ sp_add.o sp_fdp.o sp_cmp.o sp_simple.o sp_tint.o sp_fint.o \ sp_tlong.o sp_flong.o kernel_linkage.o dsemul.o diff --git a/arch/mips/math-emu/dp_add.c b/arch/mips/math-emu/dp_add.c index f1c8e70e8beb78f7be806df6f3f6b3748cc22b40..48b9ef6f8a0ddae74d4cbfe1075749b4edf7b334 100644 --- a/arch/mips/math-emu/dp_add.c +++ b/arch/mips/math-emu/dp_add.c @@ -53,7 +53,7 @@ union ieee754dp ieee754dp_add(union ieee754dp x, union ieee754dp y) case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_DNORM): case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_nanxcpt(ieee754dp_indef(), "add", x, y); + return ieee754dp_nanxcpt(ieee754dp_indef()); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_QNAN): case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_QNAN): @@ -76,7 +76,7 @@ union ieee754dp ieee754dp_add(union ieee754dp x, union ieee754dp y) if (xs == ys) return x; ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_xcpt(ieee754dp_indef(), "add", x, y); + return ieee754dp_indef(); case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_INF): case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_INF): @@ -178,5 +178,6 @@ union ieee754dp ieee754dp_add(union ieee754dp x, union ieee754dp y) } } - DPNORMRET2(xs, xe, xm, "add", x, y); + + return ieee754dp_format(xs, xe, xm); } diff --git a/arch/mips/math-emu/dp_cmp.c b/arch/mips/math-emu/dp_cmp.c index 2d9390ecf60d459c8aaa01b986081dd0eb80aafa..fe573cb6f77ff85d5f56286d27c0d6887b11c881 100644 --- a/arch/mips/math-emu/dp_cmp.c +++ b/arch/mips/math-emu/dp_cmp.c @@ -44,7 +44,7 @@ int ieee754dp_cmp(union ieee754dp x, union ieee754dp y, int cmp, int sig) return 1; if (cmp & (IEEE754_CLT | IEEE754_CGT)) { if (sig && ieee754_setandtestcx(IEEE754_INVALID_OPERATION)) - return ieee754di_xcpt(0, "fcmpf", x); + return 0; } return 0; } else { diff --git a/arch/mips/math-emu/dp_div.c b/arch/mips/math-emu/dp_div.c index 13ecffa9c25e5387ec85acf844d01b1addaf2fc4..377e11470e3f527519a40844477dd6354da17041 100644 --- a/arch/mips/math-emu/dp_div.c +++ b/arch/mips/math-emu/dp_div.c @@ -52,7 +52,7 @@ union ieee754dp ieee754dp_div(union ieee754dp x, union ieee754dp y) case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_DNORM): case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_nanxcpt(ieee754dp_indef(), "div", x, y); + return ieee754dp_nanxcpt(ieee754dp_indef()); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_QNAN): case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_QNAN): @@ -73,7 +73,7 @@ union ieee754dp ieee754dp_div(union ieee754dp x, union ieee754dp y) case CLPAIR(IEEE754_CLASS_INF, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_xcpt(ieee754dp_indef(), "div", x, y); + return ieee754dp_indef(); case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_INF): case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_INF): @@ -90,12 +90,12 @@ union ieee754dp ieee754dp_div(union ieee754dp x, union ieee754dp y) case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_ZERO): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_xcpt(ieee754dp_indef(), "div", x, y); + return ieee754dp_indef(); case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_ZERO): case CLPAIR(IEEE754_CLASS_DNORM, IEEE754_CLASS_ZERO): ieee754_setcx(IEEE754_ZERO_DIVIDE); - return ieee754dp_xcpt(ieee754dp_inf(xs ^ ys), "div", x, y); + return ieee754dp_inf(xs ^ ys); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_NORM): case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_DNORM): @@ -151,6 +151,6 @@ union ieee754dp ieee754dp_div(union ieee754dp x, union ieee754dp y) re--; } - DPNORMRET2(xs == ys ? 0 : 1, re, rm, "div", x, y); + return ieee754dp_format(xs == ys ? 0 : 1, re, rm); } } diff --git a/arch/mips/math-emu/dp_flong.c b/arch/mips/math-emu/dp_flong.c index fb5eeaadf253d77e99486251e9793f18f7ed6708..54c8f005acb22ee7fbb94c73a949c5c2e094d9d6 100644 --- a/arch/mips/math-emu/dp_flong.c +++ b/arch/mips/math-emu/dp_flong.c @@ -65,5 +65,6 @@ union ieee754dp ieee754dp_flong(s64 x) xe--; } } - DPNORMRET1(xs, xe, xm, "dp_flong", x); + + return ieee754dp_format(xs, xe, xm); } diff --git a/arch/mips/math-emu/dp_fsp.c b/arch/mips/math-emu/dp_fsp.c index 67ee97f06268e4a14cb8be7ab5af98ecdf0e79ac..ba600be6945403ff662922d5c882c45d1268f4f1 100644 --- a/arch/mips/math-emu/dp_fsp.c +++ b/arch/mips/math-emu/dp_fsp.c @@ -40,14 +40,13 @@ union ieee754dp ieee754dp_fsp(union ieee754sp x) switch (xc) { case IEEE754_CLASS_SNAN: ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_nanxcpt(ieee754dp_indef(), "fsp"); + return ieee754dp_nanxcpt(ieee754dp_indef()); case IEEE754_CLASS_QNAN: return ieee754dp_nanxcpt(builddp(xs, DP_EMAX + 1 + DP_EBIAS, ((u64) xm << (DP_FBITS - - SP_FBITS))), "fsp", - x); + SP_FBITS)))); case IEEE754_CLASS_INF: return ieee754dp_inf(xs); case IEEE754_CLASS_ZERO: diff --git a/arch/mips/math-emu/dp_mul.c b/arch/mips/math-emu/dp_mul.c index 56fb309b42c12fad68d13b4fbc1f99cca488ddd8..74bc810174973cc6e6f063b5ab67910afe0cf8e4 100644 --- a/arch/mips/math-emu/dp_mul.c +++ b/arch/mips/math-emu/dp_mul.c @@ -52,7 +52,7 @@ union ieee754dp ieee754dp_mul(union ieee754dp x, union ieee754dp y) case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_DNORM): case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_nanxcpt(ieee754dp_indef(), "mul", x, y); + return ieee754dp_nanxcpt(ieee754dp_indef()); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_QNAN): case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_QNAN): @@ -73,7 +73,7 @@ union ieee754dp ieee754dp_mul(union ieee754dp x, union ieee754dp y) case CLPAIR(IEEE754_CLASS_INF, IEEE754_CLASS_ZERO): case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_xcpt(ieee754dp_indef(), "mul", x, y); + return ieee754dp_indef(); case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_INF): case CLPAIR(IEEE754_CLASS_DNORM, IEEE754_CLASS_INF): @@ -171,6 +171,7 @@ union ieee754dp ieee754dp_mul(union ieee754dp x, union ieee754dp y) ((rm << (DP_FBITS + 1 + 3 + 1)) != 0); } assert(rm & (DP_HIDDEN_BIT << 3)); - DPNORMRET2(rs, re, rm, "mul", x, y); + + return ieee754dp_format(rs, re, rm); } } diff --git a/arch/mips/math-emu/dp_simple.c b/arch/mips/math-emu/dp_simple.c index fddeb33107ddbc68df61ab58282e98821015e0a8..4eda7595b1517e24544b2e65b397317a3285cdf1 100644 --- a/arch/mips/math-emu/dp_simple.c +++ b/arch/mips/math-emu/dp_simple.c @@ -45,7 +45,7 @@ union ieee754dp ieee754dp_neg(union ieee754dp x) union ieee754dp y = ieee754dp_indef(); ieee754_setcx(IEEE754_INVALID_OPERATION); DPSIGN(y) = DPSIGN(x); - return ieee754dp_nanxcpt(y, "neg"); + return ieee754dp_nanxcpt(y); } return x; @@ -65,7 +65,7 @@ union ieee754dp ieee754dp_abs(union ieee754dp x) if (xc == IEEE754_CLASS_SNAN) { ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_nanxcpt(ieee754dp_indef(), "abs"); + return ieee754dp_nanxcpt(ieee754dp_indef()); } return x; diff --git a/arch/mips/math-emu/dp_sqrt.c b/arch/mips/math-emu/dp_sqrt.c index 1e0fbbf56e971c66809e07e813ae9a77a9eb7f4c..3c36a86d1473402e3828002e3a2742d8bd9b8698 100644 --- a/arch/mips/math-emu/dp_sqrt.c +++ b/arch/mips/math-emu/dp_sqrt.c @@ -49,10 +49,10 @@ union ieee754dp ieee754dp_sqrt(union ieee754dp x) switch (xc) { case IEEE754_CLASS_QNAN: /* sqrt(Nan) = Nan */ - return ieee754dp_nanxcpt(x, "sqrt"); + return ieee754dp_nanxcpt(x); case IEEE754_CLASS_SNAN: ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_nanxcpt(ieee754dp_indef(), "sqrt"); + return ieee754dp_nanxcpt(ieee754dp_indef()); case IEEE754_CLASS_ZERO: /* sqrt(0) = 0 */ return x; @@ -60,7 +60,7 @@ union ieee754dp ieee754dp_sqrt(union ieee754dp x) if (xs) { /* sqrt(-Inf) = Nan */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_nanxcpt(ieee754dp_indef(), "sqrt"); + return ieee754dp_nanxcpt(ieee754dp_indef()); } /* sqrt(+Inf) = Inf */ return x; @@ -71,7 +71,7 @@ union ieee754dp ieee754dp_sqrt(union ieee754dp x) if (xs) { /* sqrt(-x) = Nan */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_nanxcpt(ieee754dp_indef(), "sqrt"); + return ieee754dp_nanxcpt(ieee754dp_indef()); } break; } diff --git a/arch/mips/math-emu/dp_sub.c b/arch/mips/math-emu/dp_sub.c index 25d25bc8d977fae7e0605de03e27b3bca753cf13..3dd62c18676752ab4f83bf9cc960e2df35334b7b 100644 --- a/arch/mips/math-emu/dp_sub.c +++ b/arch/mips/math-emu/dp_sub.c @@ -52,7 +52,7 @@ union ieee754dp ieee754dp_sub(union ieee754dp x, union ieee754dp y) case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_DNORM): case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_nanxcpt(ieee754dp_indef(), "sub", x, y); + return ieee754dp_nanxcpt(ieee754dp_indef()); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_QNAN): case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_QNAN): @@ -75,7 +75,7 @@ union ieee754dp ieee754dp_sub(union ieee754dp x, union ieee754dp y) if (xs != ys) return x; ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754dp_xcpt(ieee754dp_indef(), "sub", x, y); + return ieee754dp_indef(); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_INF): case CLPAIR(IEEE754_CLASS_DNORM, IEEE754_CLASS_INF): @@ -186,5 +186,6 @@ union ieee754dp ieee754dp_sub(union ieee754dp x, union ieee754dp y) xe--; } } - DPNORMRET2(xs, xe, xm, "sub", x, y); + + return ieee754dp_format(xs, xe, xm); } diff --git a/arch/mips/math-emu/dp_tint.c b/arch/mips/math-emu/dp_tint.c index 1270009aee9b5ff032dba50cb84d67e6751e7f59..3a23c6409275afdc34b492307eaee1297259eb64 100644 --- a/arch/mips/math-emu/dp_tint.c +++ b/arch/mips/math-emu/dp_tint.c @@ -40,7 +40,7 @@ int ieee754dp_tint(union ieee754dp x) case IEEE754_CLASS_QNAN: case IEEE754_CLASS_INF: ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754si_xcpt(ieee754si_indef(), "dp_tint", x); + return ieee754si_indef(); case IEEE754_CLASS_ZERO: return 0; case IEEE754_CLASS_DNORM: @@ -51,7 +51,7 @@ int ieee754dp_tint(union ieee754dp x) /* Set invalid. We will only use overflow for floating point overflow */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754si_xcpt(ieee754si_indef(), "dp_tint", x); + return ieee754si_indef(); } /* oh gawd */ if (xe > DP_FBITS) { @@ -96,7 +96,7 @@ int ieee754dp_tint(union ieee754dp x) if ((xm >> 31) != 0 && (xs == 0 || xm != 0x80000000)) { /* This can happen after rounding */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754si_xcpt(ieee754si_indef(), "dp_tint", x); + return ieee754si_indef(); } if (round || sticky) ieee754_setcx(IEEE754_INEXACT); diff --git a/arch/mips/math-emu/dp_tlong.c b/arch/mips/math-emu/dp_tlong.c index b9a43a2d4b36d05f39eaf8c679a4ce8d135ab6b8..cbeef6098e7624aefe4d0cc31e3df76e8aeccd3b 100644 --- a/arch/mips/math-emu/dp_tlong.c +++ b/arch/mips/math-emu/dp_tlong.c @@ -40,7 +40,7 @@ s64 ieee754dp_tlong(union ieee754dp x) case IEEE754_CLASS_QNAN: case IEEE754_CLASS_INF: ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754di_xcpt(ieee754di_indef(), "dp_tlong", x); + return ieee754di_indef(); case IEEE754_CLASS_ZERO: return 0; case IEEE754_CLASS_DNORM: @@ -54,7 +54,7 @@ s64 ieee754dp_tlong(union ieee754dp x) /* Set invalid. We will only use overflow for floating point overflow */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754di_xcpt(ieee754di_indef(), "dp_tlong", x); + return ieee754di_indef(); } /* oh gawd */ if (xe > DP_FBITS) { @@ -100,7 +100,7 @@ s64 ieee754dp_tlong(union ieee754dp x) if ((xm >> 63) != 0) { /* This can happen after rounding */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754di_xcpt(ieee754di_indef(), "dp_tlong", x); + return ieee754di_indef(); } if (round || sticky) ieee754_setcx(IEEE754_INEXACT); diff --git a/arch/mips/math-emu/ieee754.c b/arch/mips/math-emu/ieee754.c index f3b5fa0adbbbd86cdab8204554ab89be5504c6bf..ab53f849f2c7c2b851fa00dfa27fc63aa88bfbe7 100644 --- a/arch/mips/math-emu/ieee754.c +++ b/arch/mips/math-emu/ieee754.c @@ -28,7 +28,6 @@ * ######################################################################## */ -#include #include #include "ieee754int.h" @@ -38,15 +37,13 @@ /* special constants */ -#ifdef __MIPSEB__ -#define SPSTR(s, b, m) {s, b, m} -#define DPSTR(s, b, mh, ml) {s, b, mh, ml} -#elif defined(__MIPSEL__) -#define SPSTR(s, b, m) {m, b, s} -#define DPSTR(s, b, mh, ml) {ml, mh, b, s} -#else /* !defined (__MIPSEB__) && !defined (__MIPSEL__) */ -#error "MIPS but neither __MIPSEB__ nor __MIPSEL__?" -#endif +#define DPSTR(s, b, mh, ml) \ +{ \ + .sign = (s), \ + .bexp = (b), \ + .manthi = (mh), \ + .mantlo = (ml) \ +} const struct ieee754dp_const __ieee754dp_spcvals[] = { DPSTR(0, DP_EMIN - 1 + DP_EBIAS, 0, 0), /* + zero */ @@ -68,6 +65,13 @@ const struct ieee754dp_const __ieee754dp_spcvals[] = { DPSTR(0, 63 + DP_EBIAS, 0, 0), /* + 1.0e63 */ }; +#define SPSTR(s, b, m) \ +{ \ + .sign = (s), \ + .bexp = (b), \ + .mant = (m) \ +} + const struct ieee754sp_const __ieee754sp_spcvals[] = { SPSTR(0, SP_EMIN - 1 + SP_EBIAS, 0), /* + zero */ SPSTR(1, SP_EMIN - 1 + SP_EBIAS, 0), /* - zero */ @@ -87,34 +91,3 @@ const struct ieee754sp_const __ieee754sp_spcvals[] = { SPSTR(0, 31 + SP_EBIAS, 0), /* + 1.0e31 */ SPSTR(0, 63 + SP_EBIAS, 0), /* + 1.0e63 */ }; - - -int __cold ieee754si_xcpt(int r, const char *op, ...) -{ - struct ieee754xctx ax; - - if (!ieee754_tstx()) - return r; - ax.op = op; - ax.rt = IEEE754_RT_SI; - ax.rv.si = r; - va_start(ax.ap, op); - ieee754_xcpt(&ax); - va_end(ax.ap); - return ax.rv.si; -} - -s64 __cold ieee754di_xcpt(s64 r, const char *op, ...) -{ - struct ieee754xctx ax; - - if (!ieee754_tstx()) - return r; - ax.op = op; - ax.rt = IEEE754_RT_DI; - ax.rv.di = r; - va_start(ax.ap, op); - ieee754_xcpt(&ax); - va_end(ax.ap); - return ax.rv.di; -} diff --git a/arch/mips/math-emu/ieee754.h b/arch/mips/math-emu/ieee754.h index a62aa5a40af997555ff4df29f7531bd6395ace55..e87a6361149bee0c06ad19b14c28ba18e69f5222 100644 --- a/arch/mips/math-emu/ieee754.h +++ b/arch/mips/math-emu/ieee754.h @@ -24,7 +24,6 @@ #ifndef __ARCH_MIPS_MATH_EMU_IEEE754_H #define __ARCH_MIPS_MATH_EMU_IEEE754_H -#include #include #include #include @@ -343,19 +342,6 @@ static inline s64 ieee754di_indef(void) return S64_MAX; } -/* IEEE exception context, passed to handler */ -struct ieee754xctx { - const char *op; /* operation name */ - int rt; /* result type */ - union { - union ieee754sp sp; /* single precision */ - union ieee754dp dp; /* double precision */ - int si; /* standard signed integer (32bits) */ - s64 di; /* extended signed integer (64bits) */ - } rv; /* default result format implied by op */ - va_list ap; -}; - /* result types for xctx.rt */ #define IEEE754_RT_SP 0 #define IEEE754_RT_DP 1 @@ -363,8 +349,6 @@ struct ieee754xctx { #define IEEE754_RT_SI 3 #define IEEE754_RT_DI 4 -extern void __cold ieee754_xcpt(struct ieee754xctx *xcp); - /* compat */ #define ieee754dp_fix(x) ieee754dp_tint(x) #define ieee754sp_fix(x) ieee754sp_tint(x) diff --git a/arch/mips/math-emu/ieee754dp.c b/arch/mips/math-emu/ieee754dp.c index d9ceb6bd3536ae132a4567ec1026eafdf63d6c2d..39c01885683499e11974e65534558894759f66a6 100644 --- a/arch/mips/math-emu/ieee754dp.c +++ b/arch/mips/math-emu/ieee754dp.c @@ -23,7 +23,6 @@ * ######################################################################## */ -#include #include #include "ieee754dp.h" @@ -47,25 +46,8 @@ static inline int ieee754dp_issnan(union ieee754dp x) } -union ieee754dp __cold ieee754dp_xcpt(union ieee754dp r, const char *op, ...) +union ieee754dp __cold ieee754dp_nanxcpt(union ieee754dp r) { - struct ieee754xctx ax; - if (!ieee754_tstx()) - return r; - - ax.op = op; - ax.rt = IEEE754_RT_DP; - ax.rv.dp = r; - va_start(ax.ap, op); - ieee754_xcpt(&ax); - va_end(ax.ap); - return ax.rv.dp; -} - -union ieee754dp __cold ieee754dp_nanxcpt(union ieee754dp r, const char *op, ...) -{ - struct ieee754xctx ax; - assert(ieee754dp_isnan(r)); if (!ieee754dp_issnan(r)) /* QNAN does not cause invalid op !! */ @@ -80,13 +62,7 @@ union ieee754dp __cold ieee754dp_nanxcpt(union ieee754dp r, const char *op, ...) return ieee754dp_indef(); } - ax.op = op; - ax.rt = 0; - ax.rv.dp = r; - va_start(ax.ap, op); - ieee754_xcpt(&ax); - va_end(ax.ap); - return ax.rv.dp; + return r; } static u64 get_rounding(int sn, u64 xm) diff --git a/arch/mips/math-emu/ieee754dp.h b/arch/mips/math-emu/ieee754dp.h index 179d249a627b605de0d0fa40e84ff8e4f435b497..91d785e491019bef8a7d16a0cd751c8d3ee67d43 100644 --- a/arch/mips/math-emu/ieee754dp.h +++ b/arch/mips/math-emu/ieee754dp.h @@ -81,20 +81,5 @@ static inline union ieee754dp builddp(int s, int bx, u64 m) } extern int ieee754dp_isnan(union ieee754dp); -extern int __cold ieee754si_xcpt(int, const char *, ...); -extern s64 __cold ieee754di_xcpt(s64, const char *, ...); -extern union ieee754dp __cold ieee754dp_xcpt(union ieee754dp, const char *, ...); -extern union ieee754dp __cold ieee754dp_nanxcpt(union ieee754dp, const char *, ...); +extern union ieee754dp __cold ieee754dp_nanxcpt(union ieee754dp); extern union ieee754dp ieee754dp_format(int, int, u64); - - -#define DPNORMRET2(s, e, m, name, a0, a1) \ -{ \ - union ieee754dp V = ieee754dp_format(s, e, m); \ - if (ieee754_tstx()) \ - return ieee754dp_xcpt(V, name, a0, a1); \ - else \ - return V; \ -} - -#define DPNORMRET1(s, e, m, name, a0) DPNORMRET2(s, e, m, name, a0, a0) diff --git a/arch/mips/math-emu/ieee754int.h b/arch/mips/math-emu/ieee754int.h index 4621a3d39a8f04d822360e0889d876c43e9158dc..58b90874a7fe518a3ef9dd56589104f17556f620 100644 --- a/arch/mips/math-emu/ieee754int.h +++ b/arch/mips/math-emu/ieee754int.h @@ -48,11 +48,6 @@ static inline int ieee754_setandtestcx(const unsigned int x) return ieee754_csr.mx & x; } -static inline int ieee754_tstx(void) -{ - return ieee754_csr.cx & ieee754_csr.mx; -} - #define COMPXSP \ unsigned xm; int xe; int xs __maybe_unused; int xc diff --git a/arch/mips/math-emu/ieee754sp.c b/arch/mips/math-emu/ieee754sp.c index a90837a8cd85745b8d691fd1d854b9a2d5ddd516..1941c120a168f9b81105306e843d26b542f49f89 100644 --- a/arch/mips/math-emu/ieee754sp.c +++ b/arch/mips/math-emu/ieee754sp.c @@ -23,7 +23,6 @@ * ######################################################################## */ -#include #include #include "ieee754sp.h" @@ -47,26 +46,8 @@ static inline int ieee754sp_issnan(union ieee754sp x) } -union ieee754sp __cold ieee754sp_xcpt(union ieee754sp r, const char *op, ...) +union ieee754sp __cold ieee754sp_nanxcpt(union ieee754sp r) { - struct ieee754xctx ax; - - if (!ieee754_tstx()) - return r; - - ax.op = op; - ax.rt = IEEE754_RT_SP; - ax.rv.sp = r; - va_start(ax.ap, op); - ieee754_xcpt(&ax); - va_end(ax.ap); - return ax.rv.sp; -} - -union ieee754sp __cold ieee754sp_nanxcpt(union ieee754sp r, const char *op, ...) -{ - struct ieee754xctx ax; - assert(ieee754sp_isnan(r)); if (!ieee754sp_issnan(r)) /* QNAN does not cause invalid op !! */ @@ -81,13 +62,7 @@ union ieee754sp __cold ieee754sp_nanxcpt(union ieee754sp r, const char *op, ...) return ieee754sp_indef(); } - ax.op = op; - ax.rt = 0; - ax.rv.sp = r; - va_start(ax.ap, op); - ieee754_xcpt(&ax); - va_end(ax.ap); - return ax.rv.sp; + return r; } static unsigned get_rounding(int sn, unsigned xm) diff --git a/arch/mips/math-emu/ieee754sp.h b/arch/mips/math-emu/ieee754sp.h index 0b44569582b9e1032bc69638168a51d6c0377823..e5295d7e8ce9a04ad54cec6f74ef39f8b4b1a0fe 100644 --- a/arch/mips/math-emu/ieee754sp.h +++ b/arch/mips/math-emu/ieee754sp.h @@ -87,21 +87,5 @@ static inline union ieee754sp buildsp(int s, int bx, unsigned m) } extern int ieee754sp_isnan(union ieee754sp); -extern int __cold ieee754si_xcpt(int, const char *, ...); -extern s64 __cold ieee754di_xcpt(s64, const char *, ...); -extern union ieee754sp __cold ieee754sp_xcpt(union ieee754sp, const char *, ...); -extern union ieee754sp __cold ieee754sp_nanxcpt(union ieee754sp, const char *, ...); +extern union ieee754sp __cold ieee754sp_nanxcpt(union ieee754sp); extern union ieee754sp ieee754sp_format(int, int, unsigned); - - -#define SPNORMRET2(s, e, m, name, a0, a1) \ -{ \ - union ieee754sp V = ieee754sp_format(s, e, m); \ - \ - if (ieee754_tstx()) \ - return ieee754sp_xcpt(V, name, a0, a1); \ - else \ - return V; \ -} - -#define SPNORMRET1(s, e, m, name, a0) SPNORMRET2(s, e, m, name, a0, a0) diff --git a/arch/mips/math-emu/ieee754xcpt.c b/arch/mips/math-emu/ieee754xcpt.c deleted file mode 100644 index d68408a1957057ea509af234bdd3af279596e6e5..0000000000000000000000000000000000000000 --- a/arch/mips/math-emu/ieee754xcpt.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * MIPS floating point support - * Copyright (C) 1994-2000 Algorithmics Ltd. - * - * ######################################################################## - * - * This program is free software; you can distribute it and/or modify it - * under the terms of the GNU General Public License (Version 2) as - * published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * ######################################################################## - */ - -/************************************************************************** - * Nov 7, 2000 - * Added preprocessor hacks to map to Linux kernel diagnostics. - * - * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com - * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. - *************************************************************************/ - -#include -#include -#include "ieee754.h" - -/* - * Very naff exception handler (you can plug in your own and - * override this). - */ - -static const char *const rtnames[] = { - "sp", "dp", "xp", "si", "di" -}; - -void __cold ieee754_xcpt(struct ieee754xctx *xcp) -{ - printk(KERN_DEBUG "floating point exception in \"%s\", type=%s\n", - xcp->op, rtnames[xcp->rt]); -} diff --git a/arch/mips/math-emu/sp_add.c b/arch/mips/math-emu/sp_add.c index d107bce38bfd2e003c9c147baed0332a0ed0ce71..db4d89beada67212dc226821b238bec5d82bbfaf 100644 --- a/arch/mips/math-emu/sp_add.c +++ b/arch/mips/math-emu/sp_add.c @@ -52,7 +52,7 @@ union ieee754sp ieee754sp_add(union ieee754sp x, union ieee754sp y) case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_DNORM): case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_nanxcpt(ieee754sp_indef(), "add", x, y); + return ieee754sp_nanxcpt(ieee754sp_indef()); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_QNAN): case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_QNAN): @@ -75,7 +75,7 @@ union ieee754sp ieee754sp_add(union ieee754sp x, union ieee754sp y) if (xs == ys) return x; ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_xcpt(ieee754sp_indef(), "add", x, y); + return ieee754sp_indef(); case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_INF): case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_INF): @@ -172,5 +172,6 @@ union ieee754sp ieee754sp_add(union ieee754sp x, union ieee754sp y) } } - SPNORMRET2(xs, xe, xm, "add", x, y); + + return ieee754sp_format(xs, xe, xm); } diff --git a/arch/mips/math-emu/sp_cmp.c b/arch/mips/math-emu/sp_cmp.c index adf30766ecab4130116ae8b1245a00534a5c39e6..fab49887a1b8c09810c4d600d06bf2edfdff9fa9 100644 --- a/arch/mips/math-emu/sp_cmp.c +++ b/arch/mips/math-emu/sp_cmp.c @@ -44,7 +44,7 @@ int ieee754sp_cmp(union ieee754sp x, union ieee754sp y, int cmp, int sig) return 1; if (cmp & (IEEE754_CLT | IEEE754_CGT)) { if (sig && ieee754_setandtestcx(IEEE754_INVALID_OPERATION)) - return ieee754si_xcpt(0, "fcmpf", x); + return 0; } return 0; } else { diff --git a/arch/mips/math-emu/sp_div.c b/arch/mips/math-emu/sp_div.c index 095fb20262a97cbb5ad3e929641d3c18d7bfe415..0d847a4fbc130d98fc7a10809507ae29df85ce8a 100644 --- a/arch/mips/math-emu/sp_div.c +++ b/arch/mips/math-emu/sp_div.c @@ -52,7 +52,7 @@ union ieee754sp ieee754sp_div(union ieee754sp x, union ieee754sp y) case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_DNORM): case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_nanxcpt(ieee754sp_indef(), "div", x, y); + return ieee754sp_nanxcpt(ieee754sp_indef()); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_QNAN): case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_QNAN): @@ -73,7 +73,7 @@ union ieee754sp ieee754sp_div(union ieee754sp x, union ieee754sp y) case CLPAIR(IEEE754_CLASS_INF, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_xcpt(ieee754sp_indef(), "div", x, y); + return ieee754sp_indef(); case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_INF): case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_INF): @@ -90,12 +90,12 @@ union ieee754sp ieee754sp_div(union ieee754sp x, union ieee754sp y) case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_ZERO): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_xcpt(ieee754sp_indef(), "div", x, y); + return ieee754sp_indef(); case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_ZERO): case CLPAIR(IEEE754_CLASS_DNORM, IEEE754_CLASS_ZERO): ieee754_setcx(IEEE754_ZERO_DIVIDE); - return ieee754sp_xcpt(ieee754sp_inf(xs ^ ys), "div", x, y); + return ieee754sp_inf(xs ^ ys); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_NORM): case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_DNORM): @@ -151,6 +151,6 @@ union ieee754sp ieee754sp_div(union ieee754sp x, union ieee754sp y) re--; } - SPNORMRET2(xs == ys ? 0 : 1, re, rm, "div", x, y); + return ieee754sp_format(xs == ys ? 0 : 1, re, rm); } } diff --git a/arch/mips/math-emu/sp_fdp.c b/arch/mips/math-emu/sp_fdp.c index ccbed8aadcc419b3721ee8005094d30eb50aaaaf..5c1d8aa6bfd5739fae6b2570e1fed3693b80e2f7 100644 --- a/arch/mips/math-emu/sp_fdp.c +++ b/arch/mips/math-emu/sp_fdp.c @@ -41,13 +41,13 @@ union ieee754sp ieee754sp_fdp(union ieee754dp x) switch (xc) { case IEEE754_CLASS_SNAN: ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_nanxcpt(ieee754sp_indef(), "fdp"); + return ieee754sp_nanxcpt(ieee754sp_indef()); case IEEE754_CLASS_QNAN: nan = buildsp(xs, SP_EMAX + 1 + SP_EBIAS, (u32) (xm >> (DP_FBITS - SP_FBITS))); if (!ieee754sp_isnan(nan)) nan = ieee754sp_indef(); - return ieee754sp_nanxcpt(nan, "fdp", x); + return ieee754sp_nanxcpt(nan); case IEEE754_CLASS_INF: return ieee754sp_inf(xs); case IEEE754_CLASS_ZERO: @@ -58,8 +58,8 @@ union ieee754sp ieee754sp_fdp(union ieee754dp x) ieee754_setcx(IEEE754_INEXACT); if ((ieee754_csr.rm == IEEE754_RU && !xs) || (ieee754_csr.rm == IEEE754_RD && xs)) - return ieee754sp_xcpt(ieee754sp_mind(xs), "fdp", x); - return ieee754sp_xcpt(ieee754sp_zero(xs), "fdp", x); + return ieee754sp_mind(xs); + return ieee754sp_zero(xs); case IEEE754_CLASS_NORM: break; } @@ -72,6 +72,6 @@ union ieee754sp ieee754sp_fdp(union ieee754dp x) rm = (xm >> (DP_FBITS - (SP_FBITS + 3))) | ((xm << (64 - (DP_FBITS - (SP_FBITS + 3)))) != 0); - SPNORMRET1(xs, xe, rm, "fdp", x); + return ieee754sp_format(xs, xe, rm); } } diff --git a/arch/mips/math-emu/sp_fint.c b/arch/mips/math-emu/sp_fint.c index 0d01200793d13881427612713c14dd9211e9f554..8e8687bf955dff53530dee929e3aeafaba2b4b81 100644 --- a/arch/mips/math-emu/sp_fint.c +++ b/arch/mips/math-emu/sp_fint.c @@ -66,5 +66,5 @@ union ieee754sp ieee754sp_fint(int x) xe--; } } - SPNORMRET1(xs, xe, xm, "fint", x); + return ieee754sp_format(xs, xe, xm); } diff --git a/arch/mips/math-emu/sp_flong.c b/arch/mips/math-emu/sp_flong.c index b26c155cc3e647e99a090cc1a57c8f23358b1c0d..e56e87603feb2063c9842564fedcee449f056936 100644 --- a/arch/mips/math-emu/sp_flong.c +++ b/arch/mips/math-emu/sp_flong.c @@ -65,5 +65,5 @@ union ieee754sp ieee754sp_flong(s64 x) xe--; } } - SPNORMRET1(xs, xe, xm, "sp_flong", x); + return ieee754sp_format(xs, xe, xm); } diff --git a/arch/mips/math-emu/sp_mul.c b/arch/mips/math-emu/sp_mul.c index 28f608f25499f1dbd0040e8c4ad342e385b72916..0e19d0edd3f9420850bfa559922917f699c12cba 100644 --- a/arch/mips/math-emu/sp_mul.c +++ b/arch/mips/math-emu/sp_mul.c @@ -52,7 +52,7 @@ union ieee754sp ieee754sp_mul(union ieee754sp x, union ieee754sp y) case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_DNORM): case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_nanxcpt(ieee754sp_indef(), "mul", x, y); + return ieee754sp_nanxcpt(ieee754sp_indef()); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_QNAN): case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_QNAN): @@ -73,7 +73,7 @@ union ieee754sp ieee754sp_mul(union ieee754sp x, union ieee754sp y) case CLPAIR(IEEE754_CLASS_INF, IEEE754_CLASS_ZERO): case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_xcpt(ieee754sp_indef(), "mul", x, y); + return ieee754sp_indef(); case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_INF): case CLPAIR(IEEE754_CLASS_DNORM, IEEE754_CLASS_INF): @@ -165,6 +165,6 @@ union ieee754sp ieee754sp_mul(union ieee754sp x, union ieee754sp y) } assert(rm & (SP_HIDDEN_BIT << 3)); - SPNORMRET2(rs, re, rm, "mul", x, y); + return ieee754sp_format(rs, re, rm); } } diff --git a/arch/mips/math-emu/sp_simple.c b/arch/mips/math-emu/sp_simple.c index 0f5fd57e2cac1601281d5425fb7b11db254f3acb..8f0202d73019240ff6c1c1d62d31217c561b8b29 100644 --- a/arch/mips/math-emu/sp_simple.c +++ b/arch/mips/math-emu/sp_simple.c @@ -45,7 +45,7 @@ union ieee754sp ieee754sp_neg(union ieee754sp x) union ieee754sp y = ieee754sp_indef(); ieee754_setcx(IEEE754_INVALID_OPERATION); SPSIGN(y) = SPSIGN(x); - return ieee754sp_nanxcpt(y, "neg"); + return ieee754sp_nanxcpt(y); } return x; @@ -65,7 +65,7 @@ union ieee754sp ieee754sp_abs(union ieee754sp x) if (xc == IEEE754_CLASS_SNAN) { ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_nanxcpt(ieee754sp_indef(), "abs"); + return ieee754sp_nanxcpt(ieee754sp_indef()); } return x; diff --git a/arch/mips/math-emu/sp_sqrt.c b/arch/mips/math-emu/sp_sqrt.c index 7e87f469b979fe2c62ce149bf2f38b72fbd2ce39..f4da2cc8ebe0255e0c63a570ad71e499ce9e29fa 100644 --- a/arch/mips/math-emu/sp_sqrt.c +++ b/arch/mips/math-emu/sp_sqrt.c @@ -42,10 +42,10 @@ union ieee754sp ieee754sp_sqrt(union ieee754sp x) switch (xc) { case IEEE754_CLASS_QNAN: /* sqrt(Nan) = Nan */ - return ieee754sp_nanxcpt(x, "sqrt"); + return ieee754sp_nanxcpt(x); case IEEE754_CLASS_SNAN: ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_nanxcpt(ieee754sp_indef(), "sqrt"); + return ieee754sp_nanxcpt(ieee754sp_indef()); case IEEE754_CLASS_ZERO: /* sqrt(0) = 0 */ return x; @@ -53,7 +53,7 @@ union ieee754sp ieee754sp_sqrt(union ieee754sp x) if (xs) { /* sqrt(-Inf) = Nan */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_nanxcpt(ieee754sp_indef(), "sqrt"); + return ieee754sp_nanxcpt(ieee754sp_indef()); } /* sqrt(+Inf) = Inf */ return x; @@ -62,7 +62,7 @@ union ieee754sp ieee754sp_sqrt(union ieee754sp x) if (xs) { /* sqrt(-x) = Nan */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_nanxcpt(ieee754sp_indef(), "sqrt"); + return ieee754sp_nanxcpt(ieee754sp_indef()); } break; } diff --git a/arch/mips/math-emu/sp_sub.c b/arch/mips/math-emu/sp_sub.c index 828de931690ca8a6145f51ae1c2bd1b2fad4fc09..67a1f9e6bbfe1c184e43acd66511b329239ede62 100644 --- a/arch/mips/math-emu/sp_sub.c +++ b/arch/mips/math-emu/sp_sub.c @@ -52,7 +52,7 @@ union ieee754sp ieee754sp_sub(union ieee754sp x, union ieee754sp y) case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_DNORM): case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_INF): ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_nanxcpt(ieee754sp_indef(), "sub", x, y); + return ieee754sp_nanxcpt(ieee754sp_indef()); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_QNAN): case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_QNAN): @@ -75,7 +75,7 @@ union ieee754sp ieee754sp_sub(union ieee754sp x, union ieee754sp y) if (xs != ys) return x; ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754sp_xcpt(ieee754sp_indef(), "sub", x, y); + return ieee754sp_indef(); case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_INF): case CLPAIR(IEEE754_CLASS_DNORM, IEEE754_CLASS_INF): @@ -179,5 +179,6 @@ union ieee754sp ieee754sp_sub(union ieee754sp x, union ieee754sp y) xe--; } } - SPNORMRET2(xs, xe, xm, "sub", x, y); + + return ieee754sp_format(xs, xe, xm); } diff --git a/arch/mips/math-emu/sp_tint.c b/arch/mips/math-emu/sp_tint.c index 690cb5b4cfa81dfcb8b0a426bb7148001a9427f2..53f04dc2991e0452309fb6025a5e1352b817ead2 100644 --- a/arch/mips/math-emu/sp_tint.c +++ b/arch/mips/math-emu/sp_tint.c @@ -40,7 +40,7 @@ int ieee754sp_tint(union ieee754sp x) case IEEE754_CLASS_QNAN: case IEEE754_CLASS_INF: ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754si_xcpt(ieee754si_indef(), "sp_tint", x); + return ieee754si_indef(); case IEEE754_CLASS_ZERO: return 0; case IEEE754_CLASS_DNORM: @@ -54,7 +54,7 @@ int ieee754sp_tint(union ieee754sp x) /* Set invalid. We will only use overflow for floating point overflow */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754si_xcpt(ieee754si_indef(), "sp_tint", x); + return ieee754si_indef(); } /* oh gawd */ if (xe > SP_FBITS) { @@ -100,7 +100,7 @@ int ieee754sp_tint(union ieee754sp x) if ((xm >> 31) != 0) { /* This can happen after rounding */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754si_xcpt(ieee754si_indef(), "sp_tint", x); + return ieee754si_indef(); } if (round || sticky) ieee754_setcx(IEEE754_INEXACT); diff --git a/arch/mips/math-emu/sp_tlong.c b/arch/mips/math-emu/sp_tlong.c index 346cbad4a1aef41137af200014b5c7d5d8163afa..df117923adaa809111799ab8c3f97a442f599b1e 100644 --- a/arch/mips/math-emu/sp_tlong.c +++ b/arch/mips/math-emu/sp_tlong.c @@ -41,7 +41,7 @@ s64 ieee754sp_tlong(union ieee754sp x) case IEEE754_CLASS_QNAN: case IEEE754_CLASS_INF: ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754di_xcpt(ieee754di_indef(), "sp_tlong", x); + return ieee754di_indef(); case IEEE754_CLASS_ZERO: return 0; case IEEE754_CLASS_DNORM: @@ -55,7 +55,7 @@ s64 ieee754sp_tlong(union ieee754sp x) /* Set invalid. We will only use overflow for floating point overflow */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754di_xcpt(ieee754di_indef(), "sp_tlong", x); + return ieee754di_indef(); } /* oh gawd */ if (xe > SP_FBITS) { @@ -97,7 +97,7 @@ s64 ieee754sp_tlong(union ieee754sp x) if ((xm >> 63) != 0) { /* This can happen after rounding */ ieee754_setcx(IEEE754_INVALID_OPERATION); - return ieee754di_xcpt(ieee754di_indef(), "sp_tlong", x); + return ieee754di_indef(); } if (round || sticky) ieee754_setcx(IEEE754_INEXACT);