diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-04-25 03:19:57 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-23 15:11:14 +0200 |
commit | 90efba36ed50933c6df92805bd7e5742e9cc0f46 (patch) | |
tree | edcf824726a76c68e7606954ea16fbcbc91a4f27 /arch/mips/math-emu/ieee754.c | |
parent | 593d33fe334761853890f2f84ed41e7c24051de2 (diff) | |
download | linux-90efba36ed50933c6df92805bd7e5742e9cc0f46.tar.gz linux-90efba36ed50933c6df92805bd7e5742e9cc0f46.tar.bz2 linux-90efba36ed50933c6df92805bd7e5742e9cc0f46.zip |
MIPS: math-emu: Get rid of the useless parts of exception handling.
All it really did was throw a printk for no obvious reason.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/math-emu/ieee754.c')
-rw-r--r-- | arch/mips/math-emu/ieee754.c | 55 |
1 files changed, 14 insertions, 41 deletions
diff --git a/arch/mips/math-emu/ieee754.c b/arch/mips/math-emu/ieee754.c index f3b5fa0adbbb..ab53f849f2c7 100644 --- a/arch/mips/math-emu/ieee754.c +++ b/arch/mips/math-emu/ieee754.c @@ -28,7 +28,6 @@ * ######################################################################## */ -#include <stdarg.h> #include <linux/compiler.h> #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; -} |