From: Andy Hutchinson Date: Sun, 15 Jun 2008 18:24:27 +0000 (+0000) Subject: re PR target/36336 (ICE push_reload - psuedo reg_equiv_constant) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4df5771d99a334b5029890619621b643a420db9;p=gcc.git re PR target/36336 (ICE push_reload - psuedo reg_equiv_constant) PR target/36336 * config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Add check for reg_equiv_constant. From-SVN: r136818 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 196c1aef134..777743ae0ab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-06-015 Andy Hutchinson + + PR target/36336 + * config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Add check for + reg_equiv_constant. + 2008-06-15 Maxim Kuvyrkov * config/mips/loongson2ef.md: New file. diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index 90e62a30b16..d915aff1040 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -437,6 +437,11 @@ extern int avr_reg_order[]; } #define XEXP_(X,Y) (X) + +/* LEGITIMIZE_RELOAD_ADDRESS will allow register R26/27 to be used, where it + is no worse than normal base pointers R28/29 and R30/31. For example: + If base offset is greater than 63 bytes or for R++ or --R addressing. */ + #define LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, IND_LEVELS, WIN) \ do { \ if (1&&(GET_CODE (X) == POST_INC || GET_CODE (X) == PRE_DEC)) \ @@ -448,6 +453,7 @@ do { \ } \ if (GET_CODE (X) == PLUS \ && REG_P (XEXP (X, 0)) \ + && reg_equiv_constant[REGNO (XEXP (X, 0))] == 0 \ && GET_CODE (XEXP (X, 1)) == CONST_INT \ && INTVAL (XEXP (X, 1)) >= 1) \ { \