[m68k] register renaming not properly tracking used registers
Richard Henderson
rth@redhat.com
Thu Oct 21 09:26:00 GMT 2004
On Wed, Oct 20, 2004 at 08:43:18PM -0400, Peter Barada wrote:
> * config/m68k/m68k.h (HARD_REGNO_RENAME_OK): New macro.
> * config/m68k/m68k.c (m68k_hard regno_rename_ok): Disallow
> renaming of non-live registers in interrupt functions.
> * config/m68k/m68k-protos.h (m68k_hard_regno_rename_ok): Add prototype.
Ok.
> + {
> +
> + /* Interrupt functions can only use registers that have already been
> + saved by the prologue, even if they would normally be
> + call-clobbered. */
> +
> + if (m68k_interrupt_function_p(current_function_decl)
> + && !regs_ever_live[new_reg])
> + return 0;
> +
> + return 1;
> + }
Watch the formatting.
r~
More information about the Gcc
mailing list