public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: John David Anglin <dave.anglin@bell.net>
To: Richard Sandiford <rdsandiford@googlemail.com>
Cc: <gcc-patches@gcc.gnu.org>
Subject: Re: [committed] Fix ICE in gen_reg_rtx, at emit-rtl.c:864/865	compiling GNU MPFR
Date: Fri, 04 Jan 2013 04:32:00 -0000	[thread overview]
Message-ID: <BLU0-SMTP689AC0D3861601148EE5DC97200@phx.gbl> (raw)
In-Reply-To: <87sj6j7mqn.fsf@talisman.default>

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Committed the attached change to trunk and 4.7 after testing on hppa- 
unknown-linux-gnu.
Working on a revised change for 4.6.

I don't think symbol + constant can occur but I'm not absolutely sure.

On 2-Jan-13, at 8:12 AM, Richard Sandiford wrote:

> In any case, reload needs to know up-front that the constant can't be
> rematerialised, via LEGITIMATE_CONSTANT_P.  emit_move_insn_1 would be
> too late.  It looks like PA already handles this for some TLS models:
>
>  /* TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC are not
>     legitimate constants.  */
>  if (PA_SYMBOL_REF_TLS_P (x))
>   {
>     enum tls_model model = SYMBOL_REF_TLS_MODEL (x);
>
>     if (model == TLS_MODEL_GLOBAL_DYNAMIC || model ==  
> TLS_MODEL_LOCAL_DYNAMIC)
>       return false;
>   }
>
> so maybe that should just be:
>
>  if (PA_SYMBOL_REF_TLS_P (x))
>    return false;


Dave
--
John David Anglin	dave.anglin@bell.net


[-- Attachment #2: pa-tls-reload.d.2.txt --]
[-- Type: text/plain, Size: 1530 bytes --]

2013-01-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR target/53789
	* config/pa/pa.md (movsi): Revert previous change.
	* config/pa/pa.c (pa_legitimate_constant_p): Reject all TLS symbol
	references.

Index: config/pa/pa.md
===================================================================
--- config/pa/pa.md	(revision 194824)
+++ config/pa/pa.md	(working copy)
@@ -2094,12 +2155,6 @@
   ""
   "
 {
-  /* A TLS symbol reference is not a valid move source operand.
-     pa_emit_move_sequence can only handle them prior to reload.
-     There is also no way to reload a TLS symbol reference, so
-     we must reject them after reload starts.  */
-  if (PA_SYMBOL_REF_TLS_P (operands[1]) && !can_create_pseudo_p ())
-    FAIL;
   if (pa_emit_move_sequence (operands, SImode, 0))
     DONE;
 }")
Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c	(revision 194824)
+++ config/pa/pa.c	(working copy)
@@ -10358,15 +10358,11 @@
     return false;
 
   /* TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC are not
-     legitimate constants.  */
+     legitimate constants.  The other variants can't be handled by
+     the move patterns after reload starts.  */
   if (PA_SYMBOL_REF_TLS_P (x))
-   {
-     enum tls_model model = SYMBOL_REF_TLS_MODEL (x);
+    return false;
 
-     if (model == TLS_MODEL_GLOBAL_DYNAMIC || model == TLS_MODEL_LOCAL_DYNAMIC)
-       return false;
-   }
-
   if (TARGET_64BIT && GET_CODE (x) == CONST_DOUBLE)
     return false;
 

[-- Attachment #3: Type: text/plain, Size: 5 bytes --]







  parent reply	other threads:[~2013-01-04  4:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-26 19:37 John David Anglin
2013-01-02 13:12 ` Richard Sandiford
2013-01-02 18:53   ` Richard Henderson
2013-01-02 19:44     ` Richard Sandiford
2013-01-04  4:32   ` John David Anglin [this message]
     [not found] <CAGWvnykWaA6zBYATL2m7GSj1N2wBwNNcTGi=BRSpsXVBxWchnQ@mail.gmail.com>
2013-01-03 15:14 ` David Edelsohn
2013-01-03 18:52   ` Richard Sandiford

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=BLU0-SMTP689AC0D3861601148EE5DC97200@phx.gbl \
    --to=dave.anglin@bell.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rdsandiford@googlemail.com \
    /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).