This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix ICE building hppa targets on trunk
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 11 Sep 2009 18:50:26 -0400 (EDT)
- Subject: [committed] Fix ICE building hppa targets on trunk
It seems it is now possible for a CONST_INT to be in a CONST. In any
case we need to check the code of the expression contained in a CONST
when checking for a valid symbolic operand.
Tested on hppa-unknown-linux-gnu, hppa2.0w-hp-hpux11.11 and
hppa64-hp-hpux11.11. Committed to trunk.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2009-09-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* config/pa/predicates.md (symbolic_operand): Require a CONST symbolic
operand to be a PLUS expression.
* config/pa/pa.c (pa_secondary_reload): Likewise.
Index: config/pa/predicates.md
===================================================================
--- config/pa/predicates.md (revision 151396)
+++ config/pa/predicates.md (working copy)
@@ -73,9 +73,10 @@
return 1;
case CONST:
op = XEXP (op, 0);
- return (((GET_CODE (XEXP (op, 0)) == SYMBOL_REF
- && !SYMBOL_REF_TLS_MODEL (XEXP (op, 0)))
- || GET_CODE (XEXP (op, 0)) == LABEL_REF)
+ return (GET_CODE (op) == PLUS
+ && ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF
+ && !SYMBOL_REF_TLS_MODEL (XEXP (op, 0)))
+ || GET_CODE (XEXP (op, 0)) == LABEL_REF)
&& GET_CODE (XEXP (op, 1)) == CONST_INT);
default:
return 0;
Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c (revision 151396)
+++ config/pa/pa.c (working copy)
@@ -5793,9 +5793,10 @@
break;
case CONST:
op = XEXP (x, 0);
- is_symbolic = (((GET_CODE (XEXP (op, 0)) == SYMBOL_REF
- && !SYMBOL_REF_TLS_MODEL (XEXP (op, 0)))
- || GET_CODE (XEXP (op, 0)) == LABEL_REF)
+ is_symbolic = (GET_CODE (op) == PLUS
+ && ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF
+ && !SYMBOL_REF_TLS_MODEL (XEXP (op, 0)))
+ || GET_CODE (XEXP (op, 0)) == LABEL_REF)
&& GET_CODE (XEXP (op, 1)) == CONST_INT);
break;
default: