public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52451] New: gcc w/i387 float generates fucom rather than fcom for floating point comparsons
@ 2012-03-01 15:48 bugdal at aerifal dot cx
  2012-03-01 15:56 ` [Bug c/52451] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bugdal at aerifal dot cx @ 2012-03-01 15:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52451

             Bug #: 52451
           Summary: gcc w/i387 float generates fucom rather than fcom for
                    floating point comparsons
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bugdal@aerifal.cx


The C comparison operators (as opposed to the isgreater, etc. macros) are
specified to correspond to the IEEE "unordered-signaling predicates" which
raise the INVALID exception on comparisons involving a NaN (quiet or
signaling). However, gcc on x86 is generating the FUCOM opcode rather than
FCOM, which does not raise any exception unless it encounters a signaling NaN.

Apparently this is a regression since ancient versions of gcc, which correctly
generated FCOM.

This bug report is i387-specific; I have no idea if the same issue applies with
SSE math or non-x86-family cpu archs.


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

end of thread, other threads:[~2014-09-11 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-01 15:48 [Bug c/52451] New: gcc w/i387 float generates fucom rather than fcom for floating point comparsons bugdal at aerifal dot cx
2012-03-01 15:56 ` [Bug c/52451] " rguenth at gcc dot gnu.org
2012-03-15 16:24 ` [Bug target/52451] " bugdal at aerifal dot cx
2012-04-23  9:38 ` bugdal at aerifal dot cx
2014-09-11 16:11 ` nszabolcs at gmail 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).