linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PPC: sstep.c: Add modsw, moduw instruction emulation
@ 2016-12-04 16:55 PrasannaKumar Muralidharan
  2016-12-05  8:23 ` Naveen N. Rao
  2016-12-06  6:36 ` Naveen N. Rao
  0 siblings, 2 replies; 8+ messages in thread
From: PrasannaKumar Muralidharan @ 2016-12-04 16:55 UTC (permalink / raw)
  To: benh, paulus, mpe, linuxppc-dev; +Cc: PrasannaKumar Muralidharan

Add modsw and moduw instruction emulation support to analyse_instr.

Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
---
 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;
+
+		case 267:	/* moduw */
+			regs->gpr[rd] = (unsigned int) regs->gpr[ra] %
+				(unsigned int) regs->gpr[rb];
+			goto arith_done;
 
 /*
  * Logical instructions
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-12-06 17:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).