This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix PR target/15417
- From: Denis Chertykov <denisc at overta dot ru>
- To: gcc-patches at gcc dot gnu dot org
- Cc: denisc at overta dot ru
- Date: Wed, 01 Sep 2004 00:37:13 +0400
- Subject: Fix PR target/15417
2004-08-31 Denis Chertykov <denisc@overta.ru>
PR target/15417
* config/avr/avr.c (avr_hard_regno_mode_ok): Enable usage of
frame pointer register only in Pmode while reload in progress.
Index: avr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/avr/avr.c,v
retrieving revision 1.119
diff -c -3 -p -r1.119 avr.c
*** avr.c 12 Aug 2004 13:57:00 -0000 1.119
--- avr.c 31 Aug 2004 20:11:29 -0000
*************** avr_hard_regno_mode_ok (int regno, enum
*** 5125,5130 ****
--- 5125,5136 ----
if (regno == REG_Y + 1)
return 0;
+ /* Reload can use r28:r29 for reload register and for frame pointer
+ in one insn. It's wrong. We must disable it. */
+ if (mode != Pmode && reload_in_progress && frame_pointer_required_p ()
+ && regno <= REG_Y && (regno + GET_MODE_SIZE (mode)) >= (REG_Y + 1))
+ return 0;
+
if (mode == QImode)
return 1;
/* if (regno < 24 && !AVR_ENHANCED)