public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/54347] New: REAL_VALUE_TO_TARGET_LONG_DOUBLE shouldn't be used in i386
Date: Tue, 21 Aug 2012 15:00:00 -0000	[thread overview]
Message-ID: <bug-54347-4@http.gcc.gnu.org/bugzilla/> (raw)

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

             Bug #: 54347
           Summary: REAL_VALUE_TO_TARGET_LONG_DOUBLE shouldn't be used in
                    i386
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: ubizjak@gmail.com


i386.c has

  /* The __float80 type.  */
  float80_type_node = long_double_type_node;
  if (TYPE_MODE (float80_type_node) != XFmode)
    {
      /* The __float80 type.  */
      float80_type_node = make_node (REAL_TYPE);

      TYPE_PRECISION (float80_type_node) = 80;
      layout_type (float80_type_node);
    }
  lang_hooks.types.register_builtin_type (float80_type_node, "__float80");

and

i386-interix.h:#undef LONG_DOUBLE_TYPE_SIZE
i386-interix.h:#define LONG_DOUBLE_TYPE_SIZE 64

long double may not be 80-bit.  But i386.c has

               case XFmode:
                  REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l);
                  parts[2] = gen_int_mode (l[2], SImode);
                  break;

It assumes long double is in XFmode.  It should simply use

real_to_target (l, &r, mode);

instead of

REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l);


             reply	other threads:[~2012-08-21 15:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21 15:00 hjl.tools at gmail dot com [this message]
2012-08-22 13:56 ` [Bug target/54347] REAL_VALUE_TO_TARGET_LONG_DOUBLE shouldn't be used with XFmode hjl.tools at gmail dot com
2012-08-22 19:44 ` hjl at gcc dot gnu.org
2012-10-24  9:36 ` hjl.tools at gmail dot com

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