diff options
-rw-r--r-- | gcc/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 3 | ||||
-rw-r--r-- | gcc/config/avr/avr.h | 4 |
3 files changed, 15 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af70b38..c000897 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2008-09-14 Andy Hutchinson <hutchinsonandy@aim.com> + + PR target/19636 + PR target/24894 + PR target/31644 + PR target/31786 + * config/avr/avr.c (legitimate_address_p): Fix problem where subreg + is not recognized as a valid register usage. Allow REG_X to be used + as a base pointer. + * config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Remove code that + forces a reload when using a base register. + 2008-09-14 Danny Smith <dannysmith@users.sourceforge.net> * config/i386/cygming-crtend.c (register_frame_ctor): If diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index fb217bb..279aea5 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -1089,6 +1089,8 @@ legitimate_address_p (enum machine_mode mode, rtx x, int strict) true_regnum (XEXP (x, 0))); debug_rtx (x); } + if (!strict && GET_CODE (x) == SUBREG) + x = SUBREG_REG (x); if (REG_P (x) && (strict ? REG_OK_FOR_BASE_STRICT_P (x) : REG_OK_FOR_BASE_NOSTRICT_P (x))) r = POINTER_REGS; @@ -1103,6 +1105,7 @@ legitimate_address_p (enum machine_mode mode, rtx x, int strict) if (fit) { if (! strict + || REGNO (XEXP (x,0)) == REG_X || REGNO (XEXP (x,0)) == REG_Y || REGNO (XEXP (x,0)) == REG_Z) r = BASE_POINTER_REGS; diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index 7440985..3b7cbbb 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -483,10 +483,6 @@ do { \ OPNUM, TYPE); \ goto WIN; \ } \ - push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL, \ - BASE_POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \ - OPNUM, TYPE); \ - goto WIN; \ } \ else if (! (frame_pointer_needed && XEXP (X,0) == frame_pointer_rtx)) \ { \ |