diff options
author | Gavin Koch <gavin@cygnus.com> | 1998-02-17 18:31:03 +0000 |
---|---|---|
committer | Gavin Romig-Koch <gavin@gcc.gnu.org> | 1998-02-17 18:31:03 +0000 |
commit | 365ca18bf02e2fe6b41e17990ea834d788a03856 (patch) | |
tree | 45523813e74d79790d653c6639ef7cc9e2c8a2f8 /gcc | |
parent | 153305b05c2e5965f24a64ead19b97eb95c148bc (diff) | |
download | gcc-365ca18bf02e2fe6b41e17990ea834d788a03856.zip gcc-365ca18bf02e2fe6b41e17990ea834d788a03856.tar.gz gcc-365ca18bf02e2fe6b41e17990ea834d788a03856.tar.bz2 |
mips.h (CAN_ELIMINATE): Don't eliminate the frame pointer for the stack pointer in MIPS16 and 64BIT.
* mips/mips.h (CAN_ELIMINATE): Don't eliminate the frame
pointer for the stack pointer in MIPS16 and 64BIT.
From-SVN: r18035
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 19 |
2 files changed, 18 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 22f8817..787f546 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 17 21:28:12 1998 Gavin Koch <gavin@cygnus.com> + + * mips/mips.h (CAN_ELIMINATE): Don't eliminate the frame + pointer for the stack pointer in MIPS16 and 64BIT. + Tue Feb 17 21:17:30 1997 J"orn Rennecke <amylaar@cygnus.co.uk> * rtl.h (force_line_numbers, restore_line_number_status): Declare. diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index b68d660..582478f 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2115,16 +2115,23 @@ extern struct mips_frame_info current_frame_info; cases preventing register elimination are things that the compiler already knows about. - We can always eliminate to the frame pointer. We can eliminate to - the stack pointer unless a frame pointer is needed. In mips16 - mode, we need a frame pointer for a large frame; otherwise, reload - may be unable to compute the address of a local variable, since - there is no way to add a large constant to the stack pointer - without using a temporary register. */ + When not in mips16 and mips64, we can always eliminate to the + frame pointer. We can eliminate to the stack pointer unless + a frame pointer is needed. In mips16 mode, we need a frame + pointer for a large frame; otherwise, reload may be unable + to compute the address of a local variable, since there is + no way to add a large constant to the stack pointer + without using a temporary register. + + In mips16, for some instructions (eg lwu), we can't eliminate the + frame pointer for the stack pointer. These instructions are + only generated in TARGET_64BIT mode. + */ #define CAN_ELIMINATE(FROM, TO) \ ((TO) == HARD_FRAME_POINTER_REGNUM \ || ((TO) == STACK_POINTER_REGNUM && ! frame_pointer_needed \ + && ! (TARGET_MIPS16 && TARGET_64BIT) \ && (! TARGET_MIPS16 \ || compute_frame_size (get_frame_size ()) < 32768))) |