[PATCH 5/5] powerpc sstep: Add tests for Prefixed Add Immediate
Michael Ellerman
mpe at ellerman.id.au
Wed Jul 22 15:47:07 AEST 2020
Jordan Niethe <jniethe5 at gmail.com> writes:
> On Mon, May 25, 2020 at 1:00 PM Jordan Niethe <jniethe5 at gmail.com> wrote:
>>
>> 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 <jniethe5 at gmail.com>
>> ---
>> arch/powerpc/lib/test_emulate_step.c | 127 ++++++++++++++++++
>> .../lib/test_emulate_step_exec_instr.S | 1 +
>> 2 files changed, 128 insertions(+)
...
>> 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.1
>>
>
> Because 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.
> --- 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_instr
cheers
More information about the Linuxppc-dev
mailing list