public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sje at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/60528] MIPS GCC puts out complex constant incorrectly when in big-endian mode
Date: Wed, 19 Mar 2014 21:05:00 -0000	[thread overview]
Message-ID: <bug-60528-4-IjBEpLbcc0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-60528-4@http.gcc.gnu.org/bugzilla/>

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).


  parent reply	other threads:[~2014-03-19 21:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-60528-4@http.gcc.gnu.org/bugzilla/>
2014-03-18 16:42 ` sje at gcc dot gnu.org
2014-03-19 21:05 ` sje at gcc dot gnu.org [this message]
2014-03-19 21:20 ` rsandifo at gcc dot gnu.org
2014-03-20 17:29 ` sje at gcc dot gnu.org
2015-02-10  6:27 ` [Bug middle-end/60528] GCC puts out floating point constants differently depending on if long is 32bit or 64bit (encode_ieee_double) pinskia at gcc dot gnu.org
2024-03-17  7:42 ` [Bug middle-end/60528] GCC puts out floating point constants differently depending on if long is 32bit or 64bit (due to use of long for encode_ieee_double) pinskia at gcc dot gnu.org

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-60528-4-IjBEpLbcc0@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: link
Be 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).