public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/3427] New: feholdexcept does not clear status flags
@ 2006-10-26 11:05 kreckel at ginac dot de
2007-01-05 22:03 ` [Bug math/3427] " kreckel at ginac dot de
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: kreckel at ginac dot de @ 2006-10-26 11:05 UTC (permalink / raw)
To: glibc-bugs
At least on the i386 and x86_64 architectures, calling feholdexcept fails to
clear the FPU's exception status flags. (Reading the sources, it appears like on
alpha and powerpc, the exception status flags are cleared.)
According to ISO/IEC 9899:1999 [7.6.4.2]: "The feholdexcept function saves the
current floating-point environment in the object pointed to by envp, clears the
floating-point status flags, and then installs a non-stop (continue on
floating-point exceptions) mode, if available, for all floating-point exceptions."
The Linux manpage also claims that feholdexept clears all exception flags.
--
Summary: feholdexcept does not clear status flags
Product: glibc
Version: 2.4
Status: NEW
Severity: normal
Priority: P2
Component: math
AssignedTo: aj at suse dot de
ReportedBy: kreckel at ginac dot de
CC: glibc-bugs at sources dot redhat dot com
GCC host triplet: i586-suse-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=3427
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/3427] feholdexcept does not clear status flags
2006-10-26 11:05 [Bug math/3427] New: feholdexcept does not clear status flags kreckel at ginac dot de
@ 2007-01-05 22:03 ` kreckel at ginac dot de
2007-01-05 22:05 ` kreckel at ginac dot de
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: kreckel at ginac dot de @ 2007-01-05 22:03 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From kreckel at ginac dot de 2007-01-05 22:03 -------
Created an attachment (id=1477)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=1477&action=view)
patch
This patch may be incomplete. It fixes the problem reported, but there might be
a similar problem with MMX registers, I don't know.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3427
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/3427] feholdexcept does not clear status flags
2006-10-26 11:05 [Bug math/3427] New: feholdexcept does not clear status flags kreckel at ginac dot de
2007-01-05 22:03 ` [Bug math/3427] " kreckel at ginac dot de
@ 2007-01-05 22:05 ` kreckel at ginac dot de
2007-01-06 0:01 ` kreckel at ginac dot de
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: kreckel at ginac dot de @ 2007-01-05 22:05 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From kreckel at ginac dot de 2007-01-05 22:05 -------
I might add: the patch is against glibc 2.5 vanilla.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3427
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/3427] feholdexcept does not clear status flags
2006-10-26 11:05 [Bug math/3427] New: feholdexcept does not clear status flags kreckel at ginac dot de
2007-01-05 22:03 ` [Bug math/3427] " kreckel at ginac dot de
2007-01-05 22:05 ` kreckel at ginac dot de
@ 2007-01-06 0:01 ` kreckel at ginac dot de
2007-03-22 14:51 ` jakub at redhat dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: kreckel at ginac dot de @ 2007-01-06 0:01 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From kreckel at ginac dot de 2007-01-06 00:01 -------
x86_64 is affected as well
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3427
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/3427] feholdexcept does not clear status flags
2006-10-26 11:05 [Bug math/3427] New: feholdexcept does not clear status flags kreckel at ginac dot de
` (2 preceding siblings ...)
2007-01-06 0:01 ` kreckel at ginac dot de
@ 2007-03-22 14:51 ` jakub at redhat dot com
2007-05-10 6:30 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at redhat dot com @ 2007-03-22 14:51 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From jakub at redhat dot com 2007-03-22 14:51 -------
http://sources.redhat.com/ml/libc-hacker/2007-03/msg00032.html
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|aj at suse dot de |jakub at redhat dot com
Status|NEW |ASSIGNED
http://sourceware.org/bugzilla/show_bug.cgi?id=3427
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/3427] feholdexcept does not clear status flags
2006-10-26 11:05 [Bug math/3427] New: feholdexcept does not clear status flags kreckel at ginac dot de
` (3 preceding siblings ...)
2007-03-22 14:51 ` jakub at redhat dot com
@ 2007-05-10 6:30 ` cvs-commit at gcc dot gnu dot org
2007-05-10 11:50 ` jakub at redhat dot com
2007-05-12 20:27 ` kreckel at ginac dot de
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2007-05-10 6:30 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2007-05-10 07:30 -------
Subject: Bug 3427
CVSROOT: /cvs/glibc
Module name: libc
Changes by: jakub@sourceware.org 2007-05-10 06:30:17
Modified files:
. : ChangeLog
sysdeps/s390/fpu: feholdexcpt.c
Log message:
[BZ #3427]
* sysdeps/s390/fpu/feholdexcpt.c (feholdexcept): Don't clear exceptions
in *envp.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/ChangeLog.diff?cvsroot=glibc&r1=1.10626&r2=1.10627
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/fpu/feholdexcpt.c.diff?cvsroot=glibc&r1=1.3&r2=1.4
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3427
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/3427] feholdexcept does not clear status flags
2006-10-26 11:05 [Bug math/3427] New: feholdexcept does not clear status flags kreckel at ginac dot de
` (4 preceding siblings ...)
2007-05-10 6:30 ` cvs-commit at gcc dot gnu dot org
@ 2007-05-10 11:50 ` jakub at redhat dot com
2007-05-12 20:27 ` kreckel at ginac dot de
6 siblings, 0 replies; 8+ messages in thread
From: jakub at redhat dot com @ 2007-05-10 11:50 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From jakub at redhat dot com 2007-05-10 12:50 -------
This is fixed in CVS for some time already.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=3427
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/3427] feholdexcept does not clear status flags
2006-10-26 11:05 [Bug math/3427] New: feholdexcept does not clear status flags kreckel at ginac dot de
` (5 preceding siblings ...)
2007-05-10 11:50 ` jakub at redhat dot com
@ 2007-05-12 20:27 ` kreckel at ginac dot de
6 siblings, 0 replies; 8+ messages in thread
From: kreckel at ginac dot de @ 2007-05-12 20:27 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From kreckel at ginac dot de 2007-05-12 21:27 -------
Subject: Re: feholdexcept does not clear status flags
Jakub,
jakub at redhat dot com wrote:
> ------- Additional Comments From jakub at redhat dot com 2007-05-10 12:50 -------
> This is fixed in CVS for some time already.
I just read your patch at
<http://sources.redhat.com/ml/libc-hacker/2007-03/msg00032.html> and
re-read the Intel instruction set reference. And now the patch appears
to be overly complex to me. Regarding the fnstenv insn used, the Intel
instruction set reference says: "Store FPU environment to [...] m28byte
without checking for pending unmasked floating-point exceptions. Then
mask all floating-point exceptions." Note the last sentence. The part
after the comment "Now set all exceptions to non-stop" is unnecessary.
The part "And clear all exceptions" is more easily done with the fnclex
instruction. This way, the temp fenv_t is not needed at all.
Cheers
-richy.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3427
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-05-12 20:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-26 11:05 [Bug math/3427] New: feholdexcept does not clear status flags kreckel at ginac dot de
2007-01-05 22:03 ` [Bug math/3427] " kreckel at ginac dot de
2007-01-05 22:05 ` kreckel at ginac dot de
2007-01-06 0:01 ` kreckel at ginac dot de
2007-03-22 14:51 ` jakub at redhat dot com
2007-05-10 6:30 ` cvs-commit at gcc dot gnu dot org
2007-05-10 11:50 ` jakub at redhat dot com
2007-05-12 20:27 ` kreckel at ginac dot de
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).