Re: [PATCH 2/2] arm: Add support for interrupt routines to reg_needs_saving_p

2020-05-15 Thread Christophe Lyon via Gcc-patches
On Fri, 15 May 2020 at 11:38, Ramana Radhakrishnan wrote: > > On Fri, May 15, 2020 at 7:36 AM Christophe Lyon > wrote: > > > > On Thu, 14 May 2020 at 17:58, Ramana Radhakrishnan > > wrote: > > > > > > > static bool reg_needs_saving_p (unsigned reg) > > > > { > > > >unsigned long func_type

Re: [PATCH 2/2] arm: Add support for interrupt routines to reg_needs_saving_p

2020-05-15 Thread Ramana Radhakrishnan via Gcc-patches
On Fri, May 15, 2020 at 7:36 AM Christophe Lyon wrote: > > On Thu, 14 May 2020 at 17:58, Ramana Radhakrishnan > wrote: > > > > > static bool reg_needs_saving_p (unsigned reg) > > > { > > >unsigned long func_type = arm_current_func_type (); > > > > Ah ok , you needed it here. > > Yes sorry.

Re: [PATCH 2/2] arm: Add support for interrupt routines to reg_needs_saving_p

2020-05-14 Thread Christophe Lyon via Gcc-patches
On Thu, 14 May 2020 at 17:58, Ramana Radhakrishnan wrote: > > > static bool reg_needs_saving_p (unsigned reg) > > { > >unsigned long func_type = arm_current_func_type (); > > Ah ok , you needed it here. Yes sorry. Is this patch (2/2) OK? Thanks, Christophe > > Ramana

Re: [PATCH 2/2] arm: Add support for interrupt routines to reg_needs_saving_p

2020-05-14 Thread Ramana Radhakrishnan via Gcc-patches
> static bool reg_needs_saving_p (unsigned reg) > { >unsigned long func_type = arm_current_func_type (); Ah ok , you needed it here. Ramana

[PATCH 2/2] arm: Add support for interrupt routines to reg_needs_saving_p

2020-05-14 Thread Christophe Lyon via Gcc-patches
reg_needs_saving_p is only used when dealing with non-interrupt routines, but it makes sense to extend it to support that context too, and make arm_compute_save_reg0_reg12_mask use it. Save only live registers for non-leaf functions, but assume a callee could clobber any register. 2020-05-14 Chr