Commit 365ca18b by Gavin Koch Committed by Gavin Romig-Koch

mips.h (CAN_ELIMINATE): Don't eliminate the frame pointer for the stack pointer…

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
parent 153305b0
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> Tue Feb 17 21:17:30 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
* rtl.h (force_line_numbers, restore_line_number_status): Declare. * rtl.h (force_line_numbers, restore_line_number_status): Declare.
......
...@@ -2115,16 +2115,23 @@ extern struct mips_frame_info current_frame_info; ...@@ -2115,16 +2115,23 @@ extern struct mips_frame_info current_frame_info;
cases preventing register elimination are things that the compiler cases preventing register elimination are things that the compiler
already knows about. already knows about.
We can always eliminate to the frame pointer. We can eliminate to When not in mips16 and mips64, we can always eliminate to the
the stack pointer unless a frame pointer is needed. In mips16 frame pointer. We can eliminate to the stack pointer unless
mode, we need a frame pointer for a large frame; otherwise, reload a frame pointer is needed. In mips16 mode, we need a frame
may be unable to compute the address of a local variable, since pointer for a large frame; otherwise, reload may be unable
there is no way to add a large constant to the stack pointer to compute the address of a local variable, since there is
without using a temporary register. */ 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) \ #define CAN_ELIMINATE(FROM, TO) \
((TO) == HARD_FRAME_POINTER_REGNUM \ ((TO) == HARD_FRAME_POINTER_REGNUM \
|| ((TO) == STACK_POINTER_REGNUM && ! frame_pointer_needed \ || ((TO) == STACK_POINTER_REGNUM && ! frame_pointer_needed \
&& ! (TARGET_MIPS16 && TARGET_64BIT) \
&& (! TARGET_MIPS16 \ && (! TARGET_MIPS16 \
|| compute_frame_size (get_frame_size ()) < 32768))) || compute_frame_size (get_frame_size ()) < 32768)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment