public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tschwinge at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/56831] New: [x86] sNaN value as a function call argument Date: Wed, 03 Apr 2013 12:03:00 -0000 [thread overview] Message-ID: <bug-56831-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56831 Bug #: 56831 Summary: [x86] sNaN value as a function call argument Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: minor Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: tschwinge@gcc.gnu.org Target: i686 On 32-bit x86, using a sNaN value as a function call argument may turn it into a qNaN (whilst raising an INVALID exception) already at the call site, which is unexpected. This is due to using a flds, fstps sequence (which according to my old Intel manuals correctly processes a float and double sNaN value in this way), instead of just using a movl for pushing the sNaN value onto the stack. This only happens for some optimization flags together with volatile declaration of the variable keeping the sNaN value; see the discussion in <http://news.gmane.org/find-root.php?message_id=%3c87txonzdtd.fsf%40kepler.schwinge.homeip.net%3e> and thereabouts, and the SNAN_TESTS_float and SNAN_TESTS_double usage in glibc commit 5aa4a1a1fd742479818a668d42d91ca9ec4a6318, <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5aa4a1a1fd742479818a668d42d91ca9ec4a6318>.
reply other threads:[~2013-04-03 12:03 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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-56831-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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).