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 <sandi...@linux.ibm.com>
Signed-off-by: Balamuruhan S <bal...@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....@linux.vnet.ibm.com>


- Naveen

Reply via email to