Fix reg-alloc error reported by Andreas Schwab to Trillian list.

* config/ia64/ia64.c (find_gr_spill): Subtract frame_pointer_needed
	from 80 in try_locals code.
	(ia64_expand_prologue): Add comment pointing to find_gr_spill change.

From-SVN: r40447
This commit is contained in:
Jim Wilson 2001-03-14 02:29:02 +00:00 committed by Jim Wilson
parent 75e93faacc
commit 9502c55830
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2001-03-13 Jim Wilson <wilson@redhat.com>
* config/ia64/ia64.c (find_gr_spill): Subtract frame_pointer_needed
from 80 in try_locals code.
(ia64_expand_prologue): Add comment pointing to find_gr_spill change.
2001-03-13 Zack Weinberg <zackw@stanford.edu>
* aclocal.m4 (gcc_AC_COMPILE_CHECK_SIZEOF, gcc_AC_C_CHAR_BIT,

View File

@ -1214,7 +1214,10 @@ find_gr_spill (try_locals)
if (try_locals)
{
regno = current_frame_info.n_local_regs;
if (regno < 80)
/* If there is a frame pointer, then we can't use loc79, because
that is HARD_FRAME_POINTER_REGNUM. In particular, see the
reg_name switching code in ia64_expand_prologue. */
if (regno < (80 - frame_pointer_needed))
{
current_frame_info.n_local_regs = regno + 1;
return LOC_REG (0) + regno;
@ -1874,6 +1877,10 @@ ia64_expand_prologue ()
/* Set the frame pointer register name. The regnum is logically loc79,
but of course we'll not have allocated that many locals. Rather than
worrying about renumbering the existing rtxs, we adjust the name. */
/* ??? This code means that we can never use one local register when
there is a frame pointer. loc79 gets wasted in this case, as it is
renamed to a register that will never be used. See also the try_locals
code in find_gr_spill. */
if (current_frame_info.reg_fp)
{
const char *tmp = reg_names[HARD_FRAME_POINTER_REGNUM];