Re: [PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears

2022-06-14 Thread Segher Boessenkool
On Tue, Jun 14, 2022 at 02:31:01PM +1000, Michael Ellerman wrote: > Segher Boessenkool writes: > > On Sat, Jun 11, 2022 at 08:42:27AM +, Christophe Leroy wrote: > >> I'd have a preference for using a verb, for instance ZEROISE_REGS or > >> CLEAR_REGS > > > > "Zero" is a verb as well (as well

Re: [PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears

2022-06-13 Thread Michael Ellerman
Segher Boessenkool writes: > On Sat, Jun 11, 2022 at 08:42:27AM +, Christophe Leroy wrote: >> Le 10/06/2022 à 05:32, Rohan McLure a écrit : >> > .macro ZERO_REGS start, end >> >.Lreg=\start >> >.rept (\end - \start + 1) >> >li .Lreg, 0 >> >.Lreg=.Lreg+1 >> >.endr >> >

Re: [PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears

2022-06-13 Thread Segher Boessenkool
On Sat, Jun 11, 2022 at 08:42:27AM +, Christophe Leroy wrote: > Le 10/06/2022 à 05:32, Rohan McLure a écrit : > > .macro ZERO_REGS start, end > > .Lreg=\start > > .rept (\end - \start + 1) > > li .Lreg, 0 > > .Lreg=.Lreg+1 > > .endr > > .endm > > I'd have a preference

Re: [PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears

2022-06-11 Thread Christophe Leroy
Le 10/06/2022 à 05:32, Rohan McLure a écrit : >> On 2 Jun 2022, at 2:00 am, Segher Boessenkool >> wrote: >> >> Hi! >> >> On Wed, Jun 01, 2022 at 03:48:45PM +1000, Rohan McLure wrote: >>> +.macro BINOP_REGS op, rhs, start, end >>> + .Lreg=\start >>> + .rept (\end - \start + 1) >>> + \op .L

Re: [PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears

2022-06-10 Thread Segher Boessenkool
Hi! On Fri, Jun 10, 2022 at 01:32:58PM +1000, Rohan McLure wrote: > > On 2 Jun 2022, at 2:00 am, Segher Boessenkool > > wrote: > > This is for unary operations, not binary operations (there is only one > > item on the RHS). You can in principle put a string "a,b" in the rhs > > parameter, but i

Re: [PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears

2022-06-09 Thread Rohan McLure
> On 2 Jun 2022, at 2:00 am, Segher Boessenkool > wrote: > > Hi! > > On Wed, Jun 01, 2022 at 03:48:45PM +1000, Rohan McLure wrote: >> +.macro BINOP_REGS op, rhs, start, end >> +.Lreg=\start >> +.rept (\end - \start + 1) >> +\op .Lreg, \rhs >> +.Lreg=.Lreg+1 >> +.endr >> +.en

Re: [PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears

2022-06-01 Thread Segher Boessenkool
Hi! On Wed, Jun 01, 2022 at 03:48:45PM +1000, Rohan McLure wrote: > +.macro BINOP_REGS op, rhs, start, end > + .Lreg=\start > + .rept (\end - \start + 1) > + \op .Lreg, \rhs > + .Lreg=.Lreg+1 > + .endr > +.endm This is for unary operations, not binary operations (there is only

Re: [PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears

2022-06-01 Thread Christophe Leroy
Le 01/06/2022 à 07:48, Rohan McLure a écrit : > [You don't often get email from rmcl...@linux.ibm.com. Learn why this is > important at https://aka.ms/LearnAboutSenderIdentification ] > > Macros for restoring saving registers to and from the stack exist. > Provide a macro for simply zeroing a r

[PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears

2022-05-31 Thread Rohan McLure
Macros for restoring saving registers to and from the stack exist. Provide a macro for simply zeroing a range of gprs, or an individual gpr. Signed-off-by: Rohan McLure --- arch/powerpc/include/asm/ppc_asm.h | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/powerpc/incl