Re: [PATCH 5/5] powerpc sstep: Add tests for Prefixed Add Immediate
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2020-07-22 05:50:27
Jordan Niethe [off-list ref] writes:
On Mon, May 25, 2020 at 1:00 PM Jordan Niethe [off-list ref] wrote:quoted
Use the existing support for testing compute type instructions to test Prefixed Add Immediate (paddi). The R bit of the paddi instruction controls whether current instruction address is used. Add test cases for when R=1 and for R=0. paddi has a 34 bit immediate field formed by concatenating si0 and si1. Add tests for the extreme values of this field. Skip the paddi tests if ISA v3.1 is unsupported. Some of these test cases were added by Balamuruhan S. Signed-off-by: Jordan Niethe <redacted> --- arch/powerpc/lib/test_emulate_step.c | 127 ++++++++++++++++++ .../lib/test_emulate_step_exec_instr.S | 1 + 2 files changed, 128 insertions(+)
...
quoted
diff --git a/arch/powerpc/lib/test_emulate_step_exec_instr.S b/arch/powerpc/lib/test_emulate_step_exec_instr.S index 1580f34f4f4f..aef53ee77a43 100644 --- a/arch/powerpc/lib/test_emulate_step_exec_instr.S +++ b/arch/powerpc/lib/test_emulate_step_exec_instr.S@@ -81,6 +81,7 @@ _GLOBAL(exec_instr) /* Placeholder for the test instruction */ 1: nop + nop patch_site 1b patch__exec_instr /* --2.17.1Because of the alignment requirements of prefixed instructions, the noops to be patched need to be aligned. mpe, want me to send a new version?
No I'll just squash it in.
quoted hunk ↗ jump to hunk
--- a/arch/powerpc/lib/test_emulate_step_exec_instr.S +++ b/arch/powerpc/lib/test_emulate_step_exec_instr.S@@ -80,6 +80,7 @@ _GLOBAL(exec_instr) REST_NVGPRS(r31) /* Placeholder for the test instruction */ +.align 6
I'll change it to .balign 64.
1: nop
nop
patch_site 1b patch__exec_instrcheers