diff options
author | Jim Wilson <wilson@redhat.com> | 2001-03-14 02:29:02 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2001-03-13 18:29:02 -0800 |
commit | 9502c55830f2de2066d1671567d88a2a78361103 (patch) | |
tree | 6bc77352a4d719088035b0f93c22be9d32dbf14b /gcc | |
parent | 75e93faacce9ef53574291df3ddc87783a39babc (diff) | |
download | gcc-9502c55830f2de2066d1671567d88a2a78361103.zip gcc-9502c55830f2de2066d1671567d88a2a78361103.tar.gz gcc-9502c55830f2de2066d1671567d88a2a78361103.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 88a11cd..0fcf77f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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, diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 2b72959..fb8a584 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -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]; |