[Bug target/60528] MIPS GCC puts out complex constant incorrectly when in big-endian mode

sje at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 19 21:05:00 GMT 2014


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

--- Comment #2 from Steve Ellcey <sje at gcc dot gnu.org> ---
This may actually be a glibc bug instead of a GCC bug.  While GCC puts out
different numbers based on whether or not it is built as a 32 or 64 bit object
(and I think that is a bug) that does not seem to be causing the csinh failure.

Both '.word' entries, '3624173458' and '-670793838' get assembled into the same
bit string in the object file so even though the .s files look different, the
.o files are identical.

FYI:

The reason GCC is putting out different values based on whether or not it is a
32 bit object or a 64 bit object is due to code in encode_ieee_double. It
encodes the value into image_lo and image_hi, which are 'unsigned long' but it
only fills in the 'bottom' 32 bits of these variables even if they are 64 bits
in size.  If this includes setting the bit that would be the sign bit on a 32
bit long then we wind up with a negative number on a system with 32 bit longs
and a positive number on a system with 64 bit longs when we copy the values to
buf (which is a signed long type).



More information about the Gcc-bugs mailing list