From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>, "H. J. Lu" <hongjiu.lu@intel.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Fix ia64 feraiseexcept
Date: Tue, 08 May 2007 21:30:00 -0000 [thread overview]
Message-ID: <20070508213815.GA1826@sunsite.mff.cuni.cz> (raw)
Hi!
While feraiseexcept (FE_OVERFLOW); or feraiseexcept (FE_UNDERFLOW) are
allowed to raise additionally inexact exception, feraiseexcept (FE_INEXACT)
shouldn't raise any exception but inexact.
DBL_MAX + 1.0 overflows and is inexact though, while (DBL_MAX / 2.0) + 1.0
is only inexact, but doesn't overflow.
Fixes test-fenv.
2007-05-08 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ia64/fpu/fraiseexcpt.c (feraiseexcept): Don't raise overflow
exception in addition to inexact when asked to raise only FE_INEXACT.
--- libc/sysdeps/ia64/fpu/fraiseexcpt.c.jj 2003-11-29 08:28:46.000000000 +0100
+++ libc/sysdeps/ia64/fpu/fraiseexcpt.c 2007-05-08 23:22:55.000000000 +0200
@@ -1,5 +1,6 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2001, 2002, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jes Sorensen <Jes.Sorensen@cern.ch>, 2000.
@@ -69,7 +70,7 @@ feraiseexcept (int excepts)
/* Last: inexact. */
if (FE_INEXACT & excepts)
{
- dummy = DBL_MAX;
+ dummy = DBL_MAX / 2.0;
__asm__ __volatile__ ("fadd.d.s0 %0=%1,f1" : "=f" (dummy) : "0" (dummy));
}
Jakub
next reply other threads:[~2007-05-08 21:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 21:30 Jakub Jelinek [this message]
2007-05-09 6:47 ` [PATCH] Fix ia64 feraiseexcept (take 2) Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070508213815.GA1826@sunsite.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=hongjiu.lu@intel.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).