diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-19 19:33:42 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-19 19:33:42 +0000 |
commit | 1508f037000fa87a7da01253805d497b413602f7 (patch) | |
tree | a9ed7b7ceba387bd275ac6cde64d0a054b3e52b6 | |
parent | 2d232d05278c1a5e45612ed694993cf7e9e5f963 (diff) | |
download | gcc-1508f037000fa87a7da01253805d497b413602f7.tar.gz |
* config/sparc/sparc.h (CAN_ELMINIATE): Can only eliminate FP
in favor of SP if FRAME_POINTER_REQUIRED is false.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51032 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.h | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fbaee551790..58f6ea97ea1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 19 14:12:32 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * config/sparc/sparc.h (CAN_ELMINIATE): Can only eliminate FP + in favor of SP if FRAME_POINTER_REQUIRED is false. + 2002-03-19 Lars Brinkhoff <lars@nocrew.org> * emit-rtl.c (gen_int_mode): New function. diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index e765973c07d..89f5e07db8b 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -1570,7 +1570,12 @@ extern const char leaf_reg_remap[]; {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM} } -#define CAN_ELIMINATE(FROM, TO) 1 +/* The way this is structured, we can't eliminate SFP in favor of SP + if the frame pointer is required: we want to use the SFP->HFP elimination + in that case. But the test in update_eliminables doesn't know we are + assuming below that we only do the former elimination. */ +#define CAN_ELIMINATE(FROM, TO) \ + ((TO) == HARD_FRAME_POINTER_REGNUM || !FRAME_POINTER_REQUIRED) #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ do { \ |