]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/sstep: Set NIP in instruction emulation tests
authorJordan Niethe <jniethe5@gmail.com>
Mon, 25 May 2020 02:59:21 +0000 (12:59 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 23 Jul 2020 07:25:15 +0000 (17:25 +1000)
commit33275f484393282c464182d2de40a0c72b2d0660
tree7c2610c785978f372d9a6e32ce20bfa69b2d7be1
parent03ca120d98898eccfb3ff086517f662ed0a5924e
powerpc/sstep: Set NIP in instruction emulation tests

The tests for emulation of compute instructions execute and
emulate an instruction and then compare the results to verify the
emulation. In ISA v3.1 there are instructions that operate relative to
the NIP. Therefore set the NIP in the regs used for the emulated
instruction to the location of the executed instruction so they will
give the same result.

This is a rework of a patch by Balamuruhan S.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200525025923.19843-3-jniethe5@gmail.com
arch/powerpc/lib/test_emulate_step.c