aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/alpha
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-02-26 16:29:41 +0000
committerUlrich Drepper <drepper@redhat.com>1998-02-26 16:29:41 +0000
commitf635bc2865c9d5b90896bb8345d14cc8426a25c2 (patch)
tree8bfe047e2ffd087b8168261a3a13c694f64b91a6 /sysdeps/alpha
parentd424955575ad2bd2a70c2b85fbee6c4103b802d1 (diff)
downloadglibc-f635bc2865c9d5b90896bb8345d14cc8426a25c2.tar
glibc-f635bc2865c9d5b90896bb8345d14cc8426a25c2.tar.gz
glibc-f635bc2865c9d5b90896bb8345d14cc8426a25c2.tar.bz2
glibc-f635bc2865c9d5b90896bb8345d14cc8426a25c2.zip
(feraiseexcept): Use a dummy for FE_DIVBYZERO. Kludge for
FE_UNDERFLOW.
Diffstat (limited to 'sysdeps/alpha')
-rw-r--r--sysdeps/alpha/fpu/fraiseexcpt.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index 6a53e55e7d..c2a96e3f87 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 <rth@tamu.edu>, 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. */