Re: [PATCH 1/5] powerpc/lib/sstep: Add cmpb instruction emulation

2017-07-13 Thread Segher Boessenkool
On Thu, Jul 13, 2017 at 01:43:53AM -0500, Segher Boessenkool wrote: > On Thu, Jul 13, 2017 at 01:51:30PM +1000, Andrew Donnellan wrote: > > On 13/07/17 13:25, Matt Brown wrote: > > >@@ -1049,6 +1066,13 @@ int analyse_instr(struct instruction_op *op, struct > > >pt_regs *regs, > > >

Re: [PATCH 1/5] powerpc/lib/sstep: Add cmpb instruction emulation

2017-07-12 Thread Segher Boessenkool
On Thu, Jul 13, 2017 at 01:25:44PM +1000, Matt Brown wrote: > +static nokprobe_inline void do_cmpb(struct pt_regs *regs, unsigned long v1, > + unsigned long v2, int rd) > +{ > + unsigned long out_val, mask; > + int i; > + > + out_val = 0; > + for (i = 0;

Re: [PATCH 1/5] powerpc/lib/sstep: Add cmpb instruction emulation

2017-07-12 Thread Segher Boessenkool
On Thu, Jul 13, 2017 at 01:51:30PM +1000, Andrew Donnellan wrote: > On 13/07/17 13:25, Matt Brown wrote: > >@@ -1049,6 +1066,13 @@ int analyse_instr(struct instruction_op *op, struct > >pt_regs *regs, > > do_cmp_unsigned(regs, val, val2, rd >> 2); > > goto i

Re: [PATCH 1/5] powerpc/lib/sstep: Add cmpb instruction emulation

2017-07-12 Thread Andrew Donnellan
On 13/07/17 13:25, Matt Brown wrote: @@ -1049,6 +1066,13 @@ int analyse_instr(struct instruction_op *op, struct pt_regs *regs, do_cmp_unsigned(regs, val, val2, rd >> 2); goto instr_done; + case 19173952: /* cmpb */ This looks wrong

[PATCH 1/5] powerpc/lib/sstep: Add cmpb instruction emulation

2017-07-12 Thread Matt Brown
This patch adds emulation of the cmpb instruction, enabling xmon to emulate this instruction. Signed-off-by: Matt Brown --- arch/powerpc/lib/sstep.c | 24 1 file changed, 24 insertions(+) diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index 33117f8..f3