> -----Original Message-----
> From: Robert Suchanek [mailto:robert.sucha...@imgtec.com]
> Sent: Friday, August 14, 2015 8:01 AM
> To: Mike Stump; Richard Sandiford
> Cc: Moore, Catherine; Matthew Fortune; gcc-patches@gcc.gnu.org
> Subject: RE: [PATCH][MIPS] Fix register renaming in the interrupt handlers
> 
> Hi,
> 
> > > You also need to do the same thing for
> TARGET_HARD_REGNO_SCRATCH_OK,
> > > to stop peephole2 from using unsaved registers as scratch registers.
> > >
> > > I should dig out my patches to clean up this interface.  It's just
> > > too brittle to have two macros that say what registers can be used
> > > after reload.
> 
> Indeed. I naively thought that there would be a single place that needed an
> update and overlooked this hook.
> 

Sorry for missing this as well.  
> 
> gcc/
>       * config/mips/mips-protos.h (mips_hard_regno_rename_ok): New
> prototype.
>       * config/mips/mips.c (mips_hard_regno_rename_ok): New
> function.
>       (mips_hard_regno_scratch_ok): Likewise.
>       (TARGET_HARD_REGNO_SCRATCH_OK): Define macro.
>       * config/mips/mips.h (HARD_REGNO_RENAME_OK): New.
> 
> gcc/testsuite/
>       * gcc.target/mips/interrupt_handler-bug-1.c: New test.
> ---

Based on the feedback from Richard and Mike, this looks OK now.
Thanks,
Catherine

Reply via email to