public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/55597] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88
Date: Wed, 05 Dec 2012 20:46:00 -0000	[thread overview]
Message-ID: <bug-55597-4-FbFokiFDQb@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55597-4@http.gcc.gnu.org/bugzilla/>


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

--- Comment #9 from Uros Bizjak <ubizjak at gmail dot com> 2012-12-05 20:45:40 UTC ---
I think it is better to fixup all sites where equivalent is used:

--cut here--
Index: i386.c
===================================================================
--- i386.c      (revision 194226)
+++ i386.c      (working copy)
@@ -12754,11 +12754,17 @@ ix86_tls_module_base (void)
 static rtx
 legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
 {
+  rtx xeq;
   rtx dest, base, off;
   rtx pic = NULL_RTX, tp = NULL_RTX;
   enum machine_mode tp_mode = Pmode;
   int type;

+  if (GET_MODE (x) != Pmode)
+    xeq = gen_rtx_ZERO_EXTEND (Pmode, x);
+  else
+    xeq = x;
+
   switch (model)
     {
     case TLS_MODEL_GLOBAL_DYNAMIC:
@@ -12785,7 +12791,7 @@ legitimize_tls_address (rtx x, enum tls_model mode
          tp = get_thread_pointer (Pmode, true);
          dest = force_reg (Pmode, gen_rtx_PLUS (Pmode, tp, dest));

-         set_unique_reg_note (get_last_insn (), REG_EQUAL, x);
+         set_unique_reg_note (get_last_insn (), REG_EQUAL, xeq);
        }
       else
        {
@@ -12802,7 +12808,7 @@ legitimize_tls_address (rtx x, enum tls_model mode
              end_sequence ();

              RTL_CONST_CALL_P (insns) = 1;
-             emit_libcall_block (insns, dest, rax, x);
+             emit_libcall_block (insns, dest, rax, xeq);
            }
          else
            emit_insn (gen_tls_global_dynamic_32 (dest, x, pic, caddr));
@@ -12871,7 +12877,7 @@ legitimize_tls_address (rtx x, enum tls_model mode
        {
          dest = force_reg (Pmode, gen_rtx_PLUS (Pmode, dest, tp));

-         set_unique_reg_note (get_last_insn (), REG_EQUAL, x);
+         set_unique_reg_note (get_last_insn (), REG_EQUAL, xeq);
        }
       break;

--cut here--


  parent reply	other threads:[~2012-12-05 20:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 21:01 [Bug middle-end/55597] New: " hjl.tools at gmail dot com
2012-12-04 22:29 ` [Bug middle-end/55597] " hjl.tools at gmail dot com
2012-12-04 22:52 ` bonzini at gnu dot org
2012-12-04 23:25 ` [Bug target/55597] " steven at gcc dot gnu.org
2012-12-04 23:46 ` [Bug target/55597] " steven at gcc dot gnu.org
2012-12-04 23:50 ` [Bug middle-end/55597] " hjl.tools at gmail dot com
2012-12-05 11:34 ` [Bug middle-end/55597] [4.8 Regression] " ebotcazou at gcc dot gnu.org
2012-12-05 17:28 ` hjl.tools at gmail dot com
2012-12-05 17:56 ` hjl.tools at gmail dot com
2012-12-05 20:46 ` ubizjak at gmail dot com [this message]
2012-12-06  0:22 ` hjl.tools at gmail dot com
2012-12-06 15:05 ` jakub at gcc dot gnu.org
2012-12-06 20:14 ` ubizjak at gmail dot com
2012-12-06 22:05 ` uros at gcc dot gnu.org
2012-12-07  3:44 ` hjl.tools at gmail dot com
2012-12-07  8:11 ` uros at gcc dot gnu.org
2012-12-07  8:21 ` ubizjak 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-55597-4-FbFokiFDQb@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).