Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-03-05 Thread Naveen N. Rao
On 2021/03/04 09:45AM, Segher Boessenkool wrote: > On Wed, Mar 03, 2021 at 10:01:27PM +0530, Naveen N. Rao wrote: > > On 2021/03/01 08:37PM, Segher Boessenkool wrote: > > > > And, r6 always ends up with 0xaea. It changes with the value I put into > > > > r6 though. > > > > > > That is exactly

Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-03-04 Thread Segher Boessenkool
On Wed, Mar 03, 2021 at 10:01:27PM +0530, Naveen N. Rao wrote: > On 2021/03/01 08:37PM, Segher Boessenkool wrote: > > > And, r6 always ends up with 0xaea. It changes with the value I put into > > > r6 though. > > > > That is exactly the behaviour specified for p8. 0aaa+0040=0aea. > > > > >

Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-03-04 Thread Naveen N. Rao
On 2021/03/01 08:37PM, Segher Boessenkool wrote: > Hi! > > I didn't see this until now, almost a month later, sorry about that :-) No problem. > > On Thu, Feb 04, 2021 at 01:57:53PM +0530, Naveen N. Rao wrote: > > On 2021/02/03 03:17PM, Segher Boessenkool wrote: > > > Power8 does: > > > > > >

Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-03-01 Thread Segher Boessenkool
Hi! I didn't see this until now, almost a month later, sorry about that :-) On Thu, Feb 04, 2021 at 01:57:53PM +0530, Naveen N. Rao wrote: > On 2021/02/03 03:17PM, Segher Boessenkool wrote: > > Power8 does: > > > > Load with Update Instructions (RA = 0) > > EA is placed into R0. > >

RE: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-02-04 Thread David Laight
From: Segher Boessenkool > Sent: 03 February 2021 21:18 ... > Power9 does: > > Load with Update Instructions (RA = 0) > EA is placed into R0. Does that change the value of 0? Rather reminds me of some 1960s era systems that had the small integers at fixed (global) addresses. FORTRAN always

Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-02-04 Thread Naveen N. Rao
On 2021/02/03 03:17PM, Segher Boessenkool wrote: > On Wed, Feb 03, 2021 at 03:19:09PM +0530, Naveen N. Rao wrote: > > On 2021/02/03 12:08PM, Sandipan Das wrote: > > > The Power ISA says that the fixed-point load and update > > > instructions must neither use R0 for the base address (RA) > > > nor

Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-02-03 Thread Michael Ellerman
Sandipan Das writes: > On 03/02/21 3:19 pm, Naveen N. Rao wrote: >> [...] >> >> Wouldn't it be easier to just do the below at the end? Or, am I missing >> something? >> >> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c >> index ede093e9623472..a2d726d2a5e9d1 100644 >> ---

Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-02-03 Thread Segher Boessenkool
On Wed, Feb 03, 2021 at 03:19:09PM +0530, Naveen N. Rao wrote: > On 2021/02/03 12:08PM, Sandipan Das wrote: > > The Power ISA says that the fixed-point load and update > > instructions must neither use R0 for the base address (RA) > > nor have the destination (RT) and the base address (RA) as > >

Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-02-03 Thread Sandipan Das
On 03/02/21 3:19 pm, Naveen N. Rao wrote: > [...] > > Wouldn't it be easier to just do the below at the end? Or, am I missing > something? > > diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c > index ede093e9623472..a2d726d2a5e9d1 100644 > --- a/arch/powerpc/lib/sstep.c > +++

Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-02-03 Thread Sandipan Das
On 03/02/21 3:19 pm, Naveen N. Rao wrote: > [...] > > Wouldn't it be easier to just do the below at the end? Or, am I missing > something? > > diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c > index ede093e9623472..a2d726d2a5e9d1 100644 > --- a/arch/powerpc/lib/sstep.c > +++

Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-02-03 Thread Naveen N. Rao
On 2021/02/03 12:08PM, Sandipan Das wrote: > The Power ISA says that the fixed-point load and update > instructions must neither use R0 for the base address (RA) > nor have the destination (RT) and the base address (RA) as > the same register. In these cases, the instruction is > invalid. This