Patchwork [committed] Fix ICE in gen_reg_rtx, at emit-rtl.c:864/865 compiling GNU MPFR

login
register
mail settings
Submitter John David Anglin
Date Dec. 26, 2012, 7:37 p.m.
Message ID <20121226193718.GA25173@hiauly1.hia.nrc.ca>
Download mbox | patch
Permalink /patch/208204/
State New
Headers show

Comments

John David Anglin - Dec. 26, 2012, 7:37 p.m.
The attached change fixes PR target/5379.  ICE occurs when reload tries
to emit a move instruction containing a TLS symbol reference as the source
operand.  This requires several scratch registers.  As a result, it isn't
possible for a reload pattern to handle this case.  So, the best solution
was to reject TLS symbol reference source operands after reload starts.

Tested on hppa-unknown-linux-gnu and hppa2.0w-hp-hpux11.11 with not observed
regressions.

Committed to all active branches.

Dave

Patch

Index: config/pa/pa.md
===================================================================
--- config/pa/pa.md	(revision 194709)
+++ config/pa/pa.md	(working copy)
@@ -2051,6 +2110,12 @@ 
   ""
   "
 {
+  /* 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;
 }")