public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/13185] New: fegetexceptflag does not report SSE exceptions on i386
@ 2011-09-13 16:38 jahns at dkrz dot de
  2011-12-22 21:31 ` [Bug math/13185] " drepper.fsp at gmail dot com
  2014-06-27 12:04 ` fweimer at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: jahns at dkrz dot de @ 2011-09-13 16:38 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13185

             Bug #: 13185
           Summary: fegetexceptflag does not report SSE exceptions on i386
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: math
        AssignedTo: aj@suse.de
        ReportedBy: jahns@dkrz.de
    Classification: Unclassified


While SSE is not part of the ABI in i386, I'd like it to report SSE exceptions
the same way as in x86_64 in case the CPU does have SSE registers.

The difference is obvious if one looks at sysdeps/i386/fpu/fgetexcptflg.c vs.
sysdeps/x86_64/fpu/fgetexcptflg.c, i.e. while the latter queries the FPU status
word and the SSE status register, the former only inspects the FPU status word.

Specifically, if one compiles code with -mfpmath=sse and -msse or -msse2 on
i386, parts of fenv.h no longer work as advertised. One could argue this is use
of an unsupported feature from libc point-of-view. But since it took me some
time to figure out why code relying on proper exception handling no longer
worked when switching on sse, I assume other people would prefer not to go down
this rabbit-hole and have fenv.h functions "just work".

I assume this requires some tricks with CPUID in assembly and a one-time-check
if the kernel handles SSE on context-switch. I'd volunteer to read up on this
and provide a patch in case nobody cares. But first I'd like to hear if my idea
is consistent with how the maintainers feel the issue should be addressed. On
the other hand, gcc and any other optimizing compiler could provide an
implementation in its runtime, but fixing this once in glibc seems like the
saner solution to me.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug math/13185] fegetexceptflag does not report SSE exceptions on i386
  2011-09-13 16:38 [Bug math/13185] New: fegetexceptflag does not report SSE exceptions on i386 jahns at dkrz dot de
@ 2011-12-22 21:31 ` drepper.fsp at gmail dot com
  2014-06-27 12:04 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-12-22 21:31 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13185

Ulrich Drepper <drepper.fsp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |drepper.fsp at gmail dot
                   |                            |com
         Resolution|                            |FIXED

--- Comment #1 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-12-22 21:31:07 UTC ---
I've checked in a patch.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug math/13185] fegetexceptflag does not report SSE exceptions on i386
  2011-09-13 16:38 [Bug math/13185] New: fegetexceptflag does not report SSE exceptions on i386 jahns at dkrz dot de
  2011-12-22 21:31 ` [Bug math/13185] " drepper.fsp at gmail dot com
@ 2014-06-27 12:04 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2014-06-27 12:04 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=13185

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-27 12:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13 16:38 [Bug math/13185] New: fegetexceptflag does not report SSE exceptions on i386 jahns at dkrz dot de
2011-12-22 21:31 ` [Bug math/13185] " drepper.fsp at gmail dot com
2014-06-27 12:04 ` fweimer at redhat dot com

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).