public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel•crashing.org>
To: Nicholas Piggin <npiggin@gmail•com>
Cc: linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH v1] powerpc: flexible GPR range save/restore macros
Date: Fri, 10 Sep 2021 12:54:25 -0500	[thread overview]
Message-ID: <20210910175425.GZ1583@gate.crashing.org> (raw)
In-Reply-To: <20210910143511.375177-1-npiggin@gmail.com>

Hi!

On Sat, Sep 11, 2021 at 12:35:11AM +1000, Nicholas Piggin wrote:
> +.macro OP_REGS op, width, start, end, base, offset
> +	.Lreg=\start
> +	.rept (\end - \start + 1)
> +	\op	.Lreg,\offset+\width*.Lreg(\base)
> +	.Lreg=.Lreg+1
> +	.endr
> +.endm

"offset" here is the offset of reg "0", not the offset of reg "start".
This isn't new, but documenting it would not hurt :-)

".Lreg" does not really give you much protection, you could use any name
that won't collide, it will be a local symbol anyway.  You could use a
name with a "$" in it, even as first letter, for example.  As written it
still conflicts with any other symbol ".Lreg".  Pretty unlikely of
course :-)

Looks fine in any case.

Reviewed-by: Segher Boessenkool <segher@kernel•crashing.org>


Segher

      reply	other threads:[~2021-09-10 17:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 14:35 [PATCH v1] powerpc: flexible GPR range save/restore macros Nicholas Piggin
2021-09-10 17:54 ` Segher Boessenkool [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210910175425.GZ1583@gate.crashing.org \
    --to=segher@kernel$(echo .)crashing.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=npiggin@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox