[PATCH v2] powerpc test_emulate_step: fix DS operand in ld encoding to appropriate value
Naveen N. Rao
naveen.n.rao at linux.vnet.ibm.com
Mon Mar 16 18:58:42 AEDT 2020
Balamuruhan S wrote:
> ld instruction should have 14 bit immediate field (DS) concatenated with
> 0b00 on the right, encode it accordingly. Introduce macro `IMM_DS()`
> to encode DS form instructions with 14 bit immediate field.
>
> Fixes: 4ceae137bdab ("powerpc: emulate_step() tests for load/store instructions")
> Reviewed-by: Sandipan Das <sandipan at linux.ibm.com>
> Signed-off-by: Balamuruhan S <bala24 at linux.ibm.com>
> ---
> arch/powerpc/lib/test_emulate_step.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
LGTM. We ought to be careful when using TEST_LD() to ensure that the
immediate value is aligned to a word, but since this is for selftests,
we don't need to enforce that.
Long term, we should also consider generalizing the macros across this
and the eBPF codebase so that we can reuse these.
Reviewed-by: Naveen N. Rao <naveen.n.rao at linux.vnet.ibm.com>
- Naveen
More information about the Linuxppc-dev
mailing list