diff options
author | Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> | 2017-02-14 10:16:43 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-03-03 01:24:50 +0100 |
commit | 4ceae137bdab2232e57b2e6fd5631a22a0160938 (patch) | |
tree | 3a8d481102d8e79646e31875d378aac46898f2f4 /arch/powerpc/include | |
parent | powerpc: Emulation support for load/store instructions on LE (diff) | |
download | linux-4ceae137bdab2232e57b2e6fd5631a22a0160938.tar.xz linux-4ceae137bdab2232e57b2e6fd5631a22a0160938.zip |
powerpc: emulate_step() tests for load/store instructions
Add new selftest that test emulate_step for Normal, Floating Point,
Vector and Vector Scalar - load/store instructions. Test should run
at boot time if CONFIG_KPROBES_SANITY_TEST and CONFIG_PPC64 is set.
Sample log:
emulate_step_test: ld : PASS
emulate_step_test: lwz : PASS
emulate_step_test: lwzx : PASS
emulate_step_test: std : PASS
emulate_step_test: ldarx / stdcx. : PASS
emulate_step_test: lfsx : PASS
emulate_step_test: stfsx : PASS
emulate_step_test: lfdx : PASS
emulate_step_test: stfdx : PASS
emulate_step_test: lvx : PASS
emulate_step_test: stvx : PASS
emulate_step_test: lxvd2x : PASS
emulate_step_test: stxvd2x : PASS
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
[mpe: Drop start/complete lines, make it all __init]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/ppc-opcode.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index d99bd442aacb..e7d6d86563ee 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h @@ -284,6 +284,13 @@ #define PPC_INST_BRANCH_COND 0x40800000 #define PPC_INST_LBZCIX 0x7c0006aa #define PPC_INST_STBCIX 0x7c0007aa +#define PPC_INST_LWZX 0x7c00002e +#define PPC_INST_LFSX 0x7c00042e +#define PPC_INST_STFSX 0x7c00052e +#define PPC_INST_LFDX 0x7c0004ae +#define PPC_INST_STFDX 0x7c0005ae +#define PPC_INST_LVX 0x7c0000ce +#define PPC_INST_STVX 0x7c0001ce /* macros to insert fields into opcodes */ #define ___PPC_RA(a) (((a) & 0x1f) << 16) |