re PR target/15417 (ICE while building an avr-cross compiler)

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.

From-SVN: r86842
This commit is contained in:
Denis Chertykov 2004-08-31 20:25:32 +00:00 committed by Denis Chertykov
parent 43b4305759
commit 678584fc80
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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.
2004-08-31 Stephane Carrez <stcarrez@nerim.fr>
PR target/15334

View File

@ -5125,6 +5125,12 @@ avr_hard_regno_mode_ok (int regno, enum machine_mode mode)
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)