From: Michael Ellerman <mpe@ellerman•id.au>
To: "Naveen N. Rao" <naveen.n.rao@linux•ibm.com>,
Daniel Axtens <dja@axtens•net>,
linuxppc-dev@lists•ozlabs.org,
Sathvika Vasireddy <sathvika@linux•vnet.ibm.com>
Subject: Re: [PATCH 1/2] powerpc/sstep: Add emulation support for ‘setb’ instruction
Date: Wed, 21 Apr 2021 17:30:39 +1000 [thread overview]
Message-ID: <87lf9caycg.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <1618899164.u2uju6vw3c.naveen@linux.ibm.com>
"Naveen N. Rao" <naveen.n.rao@linux•ibm.com> writes:
> Daniel Axtens wrote:
>> Sathvika Vasireddy <sathvika@linux•vnet.ibm.com> writes:
>>
>>> This adds emulation support for the following instruction:
>>> * Set Boolean (setb)
>>>
>>> Signed-off-by: Sathvika Vasireddy <sathvika@linux•vnet.ibm.com>
...
>>
>> If you do end up respinning the patch, I think it would be good to make
>> the maths a bit clearer. I think it works because a left shift of 2 is
>> the same as multiplying by 4, but it would be easier to follow if you
>> used a temporary variable for btf.
>
> Indeed. I wonder if it is better to follow the ISA itself. Per the ISA,
> the bit we are interested in is:
> 4 x BFA + 32
>
> So, if we use that along with the PPC_BIT() macro, we get:
> if (regs->ccr & PPC_BIT(ra + 32))
Use of PPC_BIT risks annoying your maintainer :)
cheers
next prev parent reply other threads:[~2021-04-21 7:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 7:02 [PATCH 0/2] powerpc/sstep: Add emulation support and tests for 'setb' instruction Sathvika Vasireddy
2021-04-16 7:02 ` [PATCH 1/2] powerpc/sstep: Add emulation support for ‘setb’ instruction Sathvika Vasireddy
2021-04-16 7:44 ` Daniel Axtens
2021-04-20 6:26 ` Naveen N. Rao
2021-04-21 7:30 ` Michael Ellerman [this message]
2021-04-22 10:01 ` Naveen N. Rao
2021-04-23 13:29 ` Michael Ellerman
2021-04-27 16:44 ` Naveen N. Rao
2021-04-22 19:13 ` Segher Boessenkool
2021-04-22 22:16 ` Gabriel Paubert
2021-04-22 23:26 ` Segher Boessenkool
2021-04-23 10:26 ` Gabriel Paubert
2021-04-23 16:57 ` Segher Boessenkool
2021-04-24 16:13 ` Daniel Axtens
2021-04-16 7:02 ` [PATCH 2/2] powerpc/sstep: Add tests for setb instruction Sathvika Vasireddy
2021-04-20 17:37 ` Naveen N. Rao
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=87lf9caycg.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=dja@axtens$(echo .)net \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=naveen.n.rao@linux$(echo .)ibm.com \
--cc=sathvika@linux$(echo .)vnet.ibm.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