This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/51446] -fno-trapping-math generates NaN constant with different sign
- From: "lucier at math dot purdue.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Dec 2011 18:32:56 +0000
- Subject: [Bug middle-end/51446] -fno-trapping-math generates NaN constant with different sign
- Auto-submitted: auto-generated
- References: <bug-51446-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51446
--- Comment #10 from lucier at math dot purdue.edu 2011-12-08 18:32:56 UTC ---
Near the end of section 5.3.2 of
Book E:
Enhanced PowerPC Architecture
Version 1.0
May 7, 2002
it says
Any instruction that generates a QNaN as the result of a disabled Invalid
Operation must generate this QNaN (i.e., 0x7FF8_0000_0000_0000).
The string x7ff8 does not otherwise occur in the manual.
The book
PowerPC User Instruction Set Architecture
Book I
Version 2.02
January 28, 2005
has the same text.
And a small test on my 10-year-old Mac Cube with a G4 powerpc processor shows
that the results have sign bit = 0, i.e., the output is
9221120237041090560 9221120237041090560
So the result is architecture dependent.
Blah.
Brad