diff options
author | Balamuruhan S <bala24@linux.ibm.com> | 2020-06-26 12:51:56 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-07-23 10:43:07 +0300 |
commit | 7e67c73b939b25d4ad18a536e52282aa35d8ee56 (patch) | |
tree | 631d99631a11294dab8a605d3e7de5d6e699ee63 /arch/powerpc/lib/test_emulate_step.c | |
parent | 93c3a0ba2a0863a5c82a518d64044434f82a57f5 (diff) | |
download | linux-7e67c73b939b25d4ad18a536e52282aa35d8ee56.tar.xz |
powerpc/test_emulate_step: Add negative tests for prefixed addi
testcases for `paddi` instruction to cover the negative case,
if R is equal to 1 and RA is not equal to 0, the instruction
form is invalid.
Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200626095158.1031507-3-bala24@linux.ibm.com
Diffstat (limited to 'arch/powerpc/lib/test_emulate_step.c')
-rw-r--r-- | arch/powerpc/lib/test_emulate_step.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/lib/test_emulate_step.c b/arch/powerpc/lib/test_emulate_step.c index 31065e986ff0..7d11ab5ef86c 100644 --- a/arch/powerpc/lib/test_emulate_step.c +++ b/arch/powerpc/lib/test_emulate_step.c @@ -1130,6 +1130,16 @@ static struct compute_test compute_tests[] = { .regs = { .gpr[21] = 0, } + }, + /* Invalid instruction form with R = 1 and RA != 0 */ + { + .descr = "RA = R22(0), SI = 0, R = 1", + .instr = TEST_PADDI(21, 22, 0, 1), + .flags = NEGATIVE_TEST, + .regs = { + .gpr[21] = 0, + .gpr[22] = 0, + } } } } |