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

Segher Boessenkool segher at kernel.crashing.org
Thu Jun 2 02:00:23 AEST 2022


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 one
item on the RHS).  You can in principle put a string "a,b" in the rhs
parameter, but in practice you need a or b to depend on the loop counter
as well, so even such trickiness won't do.  Make the naming less
confusing, maybe?  Or don't have an unused extra level of abstraction in
the first place :-)


Segher


More information about the Linuxppc-dev mailing list