powerpc/sstep: Fix DS operand in ld encoding to appropriate value
authorBalamuruhan S <bala24@linux.ibm.com>
Wed, 11 Mar 2020 10:24:05 +0000 (15:54 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 25 Mar 2020 01:06:46 +0000 (12:06 +1100)
commit3e74a0e16342626511c43937c120beb990539307
treeb95ec57c381eb598220d0f8bccbb8ec97f370e10
parentc5e76fa05b2df519b9f08571cc57e623c1569faa
powerpc/sstep: Fix DS operand in ld encoding to appropriate value

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@linux.ibm.com>
Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200311102405.392263-1-bala24@linux.ibm.com
arch/powerpc/lib/test_emulate_step.c