Skip to content

Commit

Permalink
powerpc/test_emulate_step: Add negative tests for prefixed addi
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Balamuruhan S authored and Michael Ellerman committed Jul 23, 2020
1 parent 93c3a0b commit 7e67c73
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/powerpc/lib/test_emulate_step.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
}
}
Expand Down

0 comments on commit 7e67c73

Please sign in to comment.