public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jahns at dkrz dot de" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug math/13185] New: fegetexceptflag does not report SSE exceptions on i386 Date: Tue, 13 Sep 2011 16:38:00 -0000 [thread overview] Message-ID: <bug-13185-131@http.sourceware.org/bugzilla/> (raw) 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.
next reply other threads:[~2011-09-13 16:38 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-09-13 16:38 jahns at dkrz dot de [this message] 2011-12-22 21:31 ` [Bug math/13185] " drepper.fsp at gmail dot com 2014-06-27 12:04 ` fweimer at redhat dot com
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=bug-13185-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@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: linkBe 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).