From a588b67da48d54f30ae101cf5d2e9fb0778f95a4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Feb 1998 16:30:54 +0000 Subject: Update. 1998-02-25 08:28 H.J. Lu * math/test-fenv.c (print_rounding): Fix a typo in FE_TOWARDSZERO. * sysdeps/alpha/fpu/fraiseexcpt.c (feraiseexcept): Use a dummy for FE_DIVBYZERO. Kludge for FE_UNDERFLOW. 1998-02-26 14:59 Ulrich Drepper * stdio-common/vfscanf.c [!USE_IN_LIBIO] (inchar): Add missing braces. 1998-02-19 11:00 Zack Weinberg * Makefile.in: Disable built-in rules. 1998-02-21 Andreas Jaeger * sysdeps/i386/fpu/t_exp.c: Move to ... * sysdeps/libm-i387/t_exp.c: ... here. 1998-02-21 13:51 H.J. Lu * sysdeps/libm-ieee754/s_exp2f.c (__exp2f_deltatable): Renamed from __exp2_deltatable. --- sysdeps/alpha/fpu/fraiseexcpt.c | 11 ++++++----- sysdeps/i386/fpu/fesetenv.c | 2 +- sysdeps/i386/fpu/t_exp.c | 1 - sysdeps/libm-i387/t_exp.c | 1 + sysdeps/libm-ieee754/s_exp2f.c | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 sysdeps/i386/fpu/t_exp.c create mode 100644 sysdeps/libm-i387/t_exp.c (limited to 'sysdeps') diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c index 6a53e55..c2a96e3 100644 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -24,7 +24,7 @@ void feraiseexcept (int excepts) { - double tmp; + double tmp, dummy; /* Raise exceptions represented by EXPECTS. But we must raise only one signal at a time. It is important the if the overflow/underflow @@ -45,8 +45,8 @@ feraiseexcept (int excepts) /* Next: division by zero. */ if (FE_DIVBYZERO & excepts) { - __asm__ __volatile__("cmpteq $f31,$f31,%0; divt/sui %0,$f31,%0; trapb" - : "=f"(tmp)); + __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb" + : "=f"(tmp), "=f"(dummy)); } /* Next: overflow. */ @@ -60,7 +60,8 @@ feraiseexcept (int excepts) if (FE_UNDERFLOW & excepts) { __asm__ __volatile__("divt/sui %1,%2,%0; trapb" - : "=f"(tmp) : "f"(DBL_MIN), "f"(16.0)); + : "=f"(tmp) : "f"(DBL_MIN), + "f"((double) (1UL << 60))); } /* Last: inexact. */ diff --git a/sysdeps/i386/fpu/fesetenv.c b/sysdeps/i386/fpu/fesetenv.c index 3faf01a..3641bb8 100644 --- a/sysdeps/i386/fpu/fesetenv.c +++ b/sysdeps/i386/fpu/fesetenv.c @@ -40,7 +40,7 @@ fesetenv (const fenv_t *envp) if (envp == FE_DFL_ENV) { temp.control_word |= FE_ALL_EXCEPT; - temp.control_word &= ~FE_TOWARDSZERO; + temp.control_word &= ~FE_TOWARDZERO; temp.status_word &= ~FE_ALL_EXCEPT; temp.eip = 0; temp.cs_selector = 0; diff --git a/sysdeps/i386/fpu/t_exp.c b/sysdeps/i386/fpu/t_exp.c deleted file mode 100644 index fd37963..0000000 --- a/sysdeps/i386/fpu/t_exp.c +++ /dev/null @@ -1 +0,0 @@ -/* Empty. Not needed. */ diff --git a/sysdeps/libm-i387/t_exp.c b/sysdeps/libm-i387/t_exp.c new file mode 100644 index 0000000..fd37963 --- /dev/null +++ b/sysdeps/libm-i387/t_exp.c @@ -0,0 +1 @@ +/* Empty. Not needed. */ diff --git a/sysdeps/libm-ieee754/s_exp2f.c b/sysdeps/libm-ieee754/s_exp2f.c index 11c5d55..428f46f 100644 --- a/sysdeps/libm-ieee754/s_exp2f.c +++ b/sysdeps/libm-ieee754/s_exp2f.c @@ -94,7 +94,7 @@ __ieee754_exp2f (float x) /* 'tval & 255' is the same as 'tval%256' except that it's always positive. Compute x = x2. */ - x -= __exp2_deltatable[tval & 255]; + x -= __exp2f_deltatable[tval & 255]; /* 3. Compute ex2 = 2^(t/255+e+ex). */ ex2_u.f = __exp2f_atable[tval & 255]; -- cgit v1.1