public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "simonbyrne at gmail dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug math/17907] New: fma modifies and does not reset SSE rounding mode on 32bit machines Date: Fri, 30 Jan 2015 11:59:00 -0000 [thread overview] Message-ID: <bug-17907-131@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=17907 Bug ID: 17907 Summary: fma modifies and does not reset SSE rounding mode on 32bit machines Product: glibc Version: 2.19 Status: NEW Severity: normal Priority: P2 Component: math Assignee: unassigned at sourceware dot org Reporter: simonbyrne at gmail dot com Created attachment 8091 --> https://sourceware.org/bugzilla/attachment.cgi?id=8091&action=edit fma rounding mode test function The software fma function modifies the rounding mode for SSE floating point instructions (to round-toward-zero), but does not reset it correctly, on 32bit (686) processors. The x87 rounding mode is unaffected. Attached is a sample program: compile on a 32bit machine with gcc: $ gcc fmacheck.c -o fmacheck -lm -msse2 -mfpmath=sse or clang: $ clang fmacheck.c -o fmacheck -lm When run as $ ./fmacheck 0x1.0000000000001p+0 it should give 0x1.ffffffffffffep-1 if rounding mode is the default (round-to-nearest). If the rounding mode has been incorrectly modified to be round-toward-zero, then you will get 0x1.ffffffffffffdp-1 -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2015-01-30 11:59 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-01-30 11:59 simonbyrne at gmail dot com [this message] 2015-01-30 14:55 ` [Bug math/17907] " simonbyrne at gmail dot com 2015-01-30 15:14 ` jsm28 at gcc dot gnu.org 2015-01-30 15:22 ` joseph at codesourcery dot com 2015-01-30 16:15 ` simonbyrne at gmail 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-17907-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /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).