From: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
linuxppc-dev@lists.ozlabs.org, Ananth N <ananth@in.ibm.com>
Subject: Re: [PATCH] PPC: sstep.c: Add modsw, moduw instruction emulation
Date: Tue, 6 Dec 2016 01:21:03 +0530 [thread overview]
Message-ID: <CANc+2y7OOPGz+Gjgp4A8DcAAJEL1qtStkKfrnhQecVZDCcTSmg@mail.gmail.com> (raw)
In-Reply-To: <20161205082357.GB3450@naverao1-tp.localdomain>
Hi Naveen,
Thanks for the review.
>> ---
>> arch/powerpc/lib/sstep.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
>> index 9c78a9c..5acef72 100644
>> --- a/arch/powerpc/lib/sstep.c
>> +++ b/arch/powerpc/lib/sstep.c
>> @@ -1148,6 +1148,15 @@ int __kprobes analyse_instr(struct instruction_op *op, struct pt_regs *regs,
>> (int) regs->gpr[rb];
>> goto arith_done;
>>
>> + case 779: /* modsw */
>> + regs->gpr[rd] = (int) regs->gpr[ra] %
>> + (int) regs->gpr[rb];
>> + goto arith_done;
>
> Since these instructions don't update CR, you can directly goto
> instr_done.
Sure. Will use that.
>> +
>> + case 267: /* moduw */
>
> Please move this case further up so that the extended opcodes are in
> numerical order.
Placed it after divide instruction as it appeared logical. Also placed
267 below 779 as it is the order in which the instructions are
documented in the ISA book. This may help in finding related
instructions together. If this style is not preferred I can arrange it
in numerical order.
Regards,
PrasannaKumar
next prev parent reply other threads:[~2016-12-05 19:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-04 16:55 [PATCH] PPC: sstep.c: Add modsw, moduw instruction emulation PrasannaKumar Muralidharan
2016-12-05 8:23 ` Naveen N. Rao
2016-12-05 19:51 ` PrasannaKumar Muralidharan [this message]
2016-12-06 6:35 ` Naveen N. Rao
2016-12-06 16:38 ` PrasannaKumar Muralidharan
2016-12-06 6:36 ` Naveen N. Rao
2016-12-06 16:48 ` PrasannaKumar Muralidharan
2016-12-06 17:21 ` 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=CANc+2y7OOPGz+Gjgp4A8DcAAJEL1qtStkKfrnhQecVZDCcTSmg@mail.gmail.com \
--to=prasannatsmkumar@gmail.com \
--cc=ananth@in.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).