LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc test_emulate_step: fix DS operand in ld encoding to appropriate value
@ 2020-03-11  6:14 Balamuruhan S
  2020-03-11  6:14 ` [PATCH 2/2] powerpc test_emulate_step: add macro for 14 bit immediate field Balamuruhan S
  2020-03-11  7:01 ` [PATCH 1/2] powerpc test_emulate_step: fix DS operand in ld encoding to appropriate value Christophe Leroy
  0 siblings, 2 replies; 4+ messages in thread
From: Balamuruhan S @ 2020-03-11  6:14 UTC (permalink / raw)
  To: mpe
  Cc: ravi.bangoria, jniethe5, Balamuruhan S, paulus, sandipan,
	naveen.n.rao, linuxppc-dev

ld instruction should have 14 bit immediate field (DS) concatenated with
0b00 on the right, encode it accordingly.

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>
---
 arch/powerpc/lib/test_emulate_step.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/lib/test_emulate_step.c b/arch/powerpc/lib/test_emulate_step.c
index 42347067739c..51c254fd15b5 100644
--- a/arch/powerpc/lib/test_emulate_step.c
+++ b/arch/powerpc/lib/test_emulate_step.c
@@ -19,7 +19,7 @@
  * definitions.
  */
 #define TEST_LD(r, base, i)	(PPC_INST_LD | ___PPC_RT(r) |		\
-					___PPC_RA(base) | IMM_L(i))
+					___PPC_RA(base) | ((i) & 0xfffc))
 #define TEST_LWZ(r, base, i)	(PPC_INST_LWZ | ___PPC_RT(r) |		\
 					___PPC_RA(base) | IMM_L(i))
 #define TEST_LWZX(t, a, b)	(PPC_INST_LWZX | ___PPC_RT(t) |		\

base-commit: 5aa19adac1f3152a5fd3b865a1ab46bb845d3696
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-11  7:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-11  6:14 [PATCH 1/2] powerpc test_emulate_step: fix DS operand in ld encoding to appropriate value Balamuruhan S
2020-03-11  6:14 ` [PATCH 2/2] powerpc test_emulate_step: add macro for 14 bit immediate field Balamuruhan S
2020-03-11  7:01 ` [PATCH 1/2] powerpc test_emulate_step: fix DS operand in ld encoding to appropriate value Christophe Leroy
2020-03-11  7:21   ` Balamuruhan S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox