From: Matt Brown <hidden> Date: 2017-07-31 00:58:49
This patch adds emulation of the cmpb instruction, enabling xmon to
emulate this instruction.
Tested for correctness against the cmpb asm instruction on ppc64le.
Signed-off-by: Matt Brown <redacted>
---
v2:
- fixed opcode
- fixed mask typecasting
---
arch/powerpc/lib/sstep.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
From: Matt Brown <hidden> Date: 2017-07-31 00:58:56
This adds emulations for the popcntb, popcntw, and popcntd instructions.
Tested for correctness against the popcnt{b,w,d} instructions on ppc64le.
Signed-off-by: Matt Brown <redacted>
---
v4:
- change ifdef macro from __powerpc64__ to CONFIG_PPC64
- slight optimisations
(now identical to the popcntb implementation in kernel/traps.c)
v3:
- optimised using the Giles-Miller method of side-ways addition
v2:
- fixed opcodes
- fixed typecasting
- fixed bitshifting error for both 32 and 64bit arch
---
arch/powerpc/lib/sstep.c | 42 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 41 insertions(+), 1 deletion(-)
From: Matt Brown <hidden> Date: 2017-07-31 00:59:02
This adds emulation for the bpermd instruction.
Tested for correctness against the bpermd instruction on ppc64le.
Signed-off-by: Matt Brown <redacted>
---
v4:
- change ifdef macro from __powerpc64__ to CONFIG_PPC64
v2:
- fixed opcode
- added ifdef tags to do_bpermd func
- fixed bitshifting errors
---
arch/powerpc/lib/sstep.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
From: Matt Brown <hidden> Date: 2017-07-31 00:59:06
This adds emulation for the prtyw and prtyd instructions.
Tested for logical correctness against the prtyw and prtyd instructions
on ppc64le.
Signed-off-by: Matt Brown <redacted>
---
v4:
- use simpler xor method
v3:
- optimised using the Giles-Miller method of side-ways addition
v2:
- fixed opcodes
- fixed bitshifting and typecast errors
- merged do_prtyw and do_prtyd into single function
---
arch/powerpc/lib/sstep.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
From: Matt Brown <hidden> Date: 2017-07-31 00:59:10
This adds emulation for the isel instruction.
Tested for correctness against the isel instruction and its extended
mnemonics (lt, gt, eq) on ppc64le.
Signed-off-by: Matt Brown <redacted>
---
v4:
- simplify if statement to ternary op
(same as isel emulation in kernel/traps.c)
v2:
- fixed opcode
- fixed definition to include the 'if RA=0, a=0' clause
- fixed ccr bitshifting error
---
arch/powerpc/lib/sstep.c | 8 ++++++++
1 file changed, 8 insertions(+)
On Mon, 2017-07-31 at 10:58 +1000, Matt Brown wrote:
This patch adds emulation of the cmpb instruction, enabling xmon to
emulate this instruction.
Tested for correctness against the cmpb asm instruction on ppc64le.
Signed-off-by: Matt Brown <redacted>
On Mon, 2017-07-31 at 10:58 +1000, Matt Brown wrote:
This adds emulation for the prtyw and prtyd instructions.
Tested for logical correctness against the prtyw and prtyd instructions
on ppc64le.
Signed-off-by: Matt Brown <redacted>
Reviewed-by: Cyril Bur <redacted>
quoted hunk
---
v4:
- use simpler xor method
v3:
- optimised using the Giles-Miller method of side-ways addition
v2:
- fixed opcodes
- fixed bitshifting and typecast errors
- merged do_prtyw and do_prtyd into single function
---
arch/powerpc/lib/sstep.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
On Mon, 2017-07-31 at 10:58 +1000, Matt Brown wrote:
This adds emulation for the isel instruction.
Tested for correctness against the isel instruction and its extended
mnemonics (lt, gt, eq) on ppc64le.
Signed-off-by: Matt Brown <redacted>
Reviewed-by: Cyril Bur <redacted>
quoted hunk
---
v4:
- simplify if statement to ternary op
(same as isel emulation in kernel/traps.c)
v2:
- fixed opcode
- fixed definition to include the 'if RA=0, a=0' clause
- fixed ccr bitshifting error
---
arch/powerpc/lib/sstep.c | 8 ++++++++
1 file changed, 8 insertions(+)
On Mon, 2017-07-31 at 10:58 +1000, Matt Brown wrote:
This adds emulations for the popcntb, popcntw, and popcntd instructions.
Tested for correctness against the popcnt{b,w,d} instructions on ppc64le.
Signed-off-by: Matt Brown <redacted>
Unlike the rest of this series, it isn't immediately clear that it is
correct, we're definitely on the other side of the optimisation vs
readability line. It looks like it is, perhaps some comments to
clarify.
Otherwise,
Reviewed-by: Cyril Bur <redacted>
quoted hunk
---
v4:
- change ifdef macro from __powerpc64__ to CONFIG_PPC64
- slight optimisations
(now identical to the popcntb implementation in kernel/traps.c)
v3:
- optimised using the Giles-Miller method of side-ways addition
v2:
- fixed opcodes
- fixed typecasting
- fixed bitshifting error for both 32 and 64bit arch
---
arch/powerpc/lib/sstep.c | 42 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 41 insertions(+), 1 deletion(-)
I don't think so, the cmpb instruction should be 32 and 64-bit.
It isn't listed under the '64-bit Fixed-point Logical Instructions'
section in the ISA either.
Thanks,
Matt
From: Michael Ellerman <hidden> Date: 2017-08-11 12:19:51
On Mon, 2017-07-31 at 00:58:22 UTC, Matt Brown wrote:
This patch adds emulation of the cmpb instruction, enabling xmon to
emulate this instruction.
Tested for correctness against the cmpb asm instruction on ppc64le.
Signed-off-by: Matt Brown <redacted>
Reviewed-by: Cyril Bur <redacted>