This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add soft frame pointer pseudo on ppc{32,64} and prepare for (optional) FRAME_GROWS_DOWNWARD
* config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Increment.
(DWARF_FRAME_REGISTERS, DWARF_REG_TO_UNWIND_COLUMN): Adjust, so
that addition of sfp doesn't change these.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS,
REG_ALLOC_ORDER): Add sfp.
(INT_REGNO_P): Include FRAME_POINTER_REGNUM.
(FRAME_POINTER_REGNUM): Define to 113.
(HARD_FRAME_POINTER_REGNUM): Define to 31.
(REG_CLASS_CONTENTS, REGNO_REG_CLASS): Add sfp.
(STARTING_FRAME_OFFSET): Set to 0 for FRAME_GROWS_DOWNWARD.
(ELIMINABLE_REGS): Never eliminate to
FRAME_POINTER_REGNUM, but HARD_FRAME_POINTER_REGNUM
instead. Add eliminations from FRAME_POINTER_REGNUM.
(REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P,
INT_REG_OK_FOR_INDEX_P):
Include FRAME_POINTER_REGNUM.
(REGISTER_NAMES): Add sfp.
* config/rs6000/rs6000.c (rs6000_reg_names): Add sfp.
(alt_reg_names): Likewise.
(rs6000_stack_info): Handle FRAME_GROWS_DOWNWARD.
(rs6000_emit_prologue): Use HARD_FRAME_POINTER_REGNUM
instead of FRAME_POINTER_REGNUM.
(rs6000_initial_elimination_offset): Never eliminate to
FRAME_POINTER_REGNUM, but HARD_FRAME_POINTER_REGNUM
instead. Add elimination offsets from FRAME_POINTER_REGNUM.
Okay.
I would appreciate if you would wait to apply the patch until
PowerPC is able to bootstrap again.
Is the manipulation and elimination of the soft frame pointer
expensive in terms of compile time? It seems unfortunate that it needs to
be used even when stack guard is not enabled.
Thanks, David