This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [m68k] register renaming not properly tracking used registers
- From: Richard Henderson <rth at redhat dot com>
- To: Peter Barada <peter at the-baradas dot com>
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 20 Oct 2004 17:51:41 -0700
- Subject: Re: [m68k] register renaming not properly tracking used registers
- References: <20041017203226.74E61990F2@baradas.org> <20041018165942.GA31795@redhat.com> <20041021004318.74B17990F2@baradas.org>
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~