aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ia64/fpu
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-10-07 22:28:05 +0000
committerUlrich Drepper <drepper@redhat.com>2000-10-07 22:28:05 +0000
commit9b767d19e6f76c10bb0486c113f28145fdd850e5 (patch)
treecaf551d34b76bb965f7a4861057670a19f71b43b /sysdeps/ia64/fpu
parent19e89d15a12b23d3737991e9b2f094445b2123fa (diff)
downloadglibc-9b767d19e6f76c10bb0486c113f28145fdd850e5.tar
glibc-9b767d19e6f76c10bb0486c113f28145fdd850e5.tar.gz
glibc-9b767d19e6f76c10bb0486c113f28145fdd850e5.tar.bz2
glibc-9b767d19e6f76c10bb0486c113f28145fdd850e5.zip
Update.
2000-10-07 Ulrich Drepper <drepper@redhat.com> * include/features.h (__STDC_ISO_10646__): Set to correct date. Patch by Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>. 2000-10-06 Jes Sorensen <jes@linuxcare.com> * sysdeps/ia64/fpu/fraiseexcpt.c (feraiseexcept): Implement overflow generation by adding DBL_MAX to DBL_MAX instead of setting the bits manually in the fpsr and generating the exception with kill() if necessary. (feraiseexcept): Implement underflow by dividing DBL_MIN by DBL_MIN - similar to the overflow change described above. 2000-08-27 H.J. Lu <hjl@gnu.org> * sysdeps/unix/sysv/linux/ia64/clone.S: Make it a dummy as clone is not supported under Linux/ia64, use clone2. 2000-10-06 Jakub Jelinek <jakub@redhat.com> * malloc/malloc.h (__THROW): Define to nothing if not gcc. * misc/sys/cdefs.h (__THROW): Likewise.
Diffstat (limited to 'sysdeps/ia64/fpu')
-rw-r--r--sysdeps/ia64/fpu/fraiseexcpt.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/sysdeps/ia64/fpu/fraiseexcpt.c b/sysdeps/ia64/fpu/fraiseexcpt.c
index 78a881117e..57111a94cf 100644
--- a/sysdeps/ia64/fpu/fraiseexcpt.c
+++ b/sysdeps/ia64/fpu/fraiseexcpt.c
@@ -51,35 +51,20 @@ feraiseexcept (int excepts)
if (FE_DIVBYZERO & excepts)
__asm__ __volatile__ ("frcpa.s0 %0,p1=f1,f0" : "=f" (tmp) : : "p1" );
- /* XXX There seem to be no reliable way to generate
- overflow/underflow exceptions without causing inexact exceptions
- as well. */
/* Next: overflow. */
if (FE_OVERFLOW & excepts)
{
- __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr));
- fpsr |= (FE_OVERFLOW << 13);
- __asm__ __volatile__ ("mov.m ar.fpsr=%0" : : "r" (fpsr));
+ dummy = DBL_MAX;
- if (!((unsigned long int) fpsr & FE_OVERFLOW))
- {
- pid_t pid = getpid ();
- kill (pid, SIGFPE);
- }
+ __asm__ __volatile__ ("fadd.d.s0 %0=%1,%1" : "=f" (dummy) : "0" (dummy));
}
/* Next: underflow. */
if (FE_UNDERFLOW & excepts)
{
- __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr));
- fpsr |= (FE_UNDERFLOW << 13);
- __asm__ __volatile__ ("mov.m ar.fpsr=%0" : : "r" (fpsr));
+ dummy = DBL_MIN;
- if (!((unsigned long int) fpsr & FE_UNDERFLOW))
- {
- pid_t pid = getpid();
- kill (pid, SIGFPE);
- }
+ __asm__ __volatile__ ("fnma.d.s0 %0=%1,%1,f0" : "=f" (tmp) : "f" (dummy));
}
/* Last: inexact. */