aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/sstep.h
diff options
context:
space:
mode:
authorBalamuruhan S <bala24@linux.ibm.com>2020-06-26 15:21:57 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2020-07-23 17:43:11 +1000
commit68a180a44c29d7e918ae7d3c18a01b0751d1c22f (patch)
tree42bc480606bcbe80cedc3123b108d9c462488c67 /arch/powerpc/include/asm/sstep.h
parentpowerpc/test_emulate_step: Add negative tests for prefixed addi (diff)
downloadlinux-dev-68a180a44c29d7e918ae7d3c18a01b0751d1c22f.tar.xz
linux-dev-68a180a44c29d7e918ae7d3c18a01b0751d1c22f.zip
powerpc/sstep: Introduce macros to retrieve Prefix instruction operands
retrieve prefix instruction operands RA and pc relative bit R values using macros and adopt it in sstep.c and test_emulate_step.c. Signed-off-by: Balamuruhan S <bala24@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200626095158.1031507-4-bala24@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/sstep.h')
-rw-r--r--arch/powerpc/include/asm/sstep.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/sstep.h b/arch/powerpc/include/asm/sstep.h
index 3b01c69a44aa..325975b4ef30 100644
--- a/arch/powerpc/include/asm/sstep.h
+++ b/arch/powerpc/include/asm/sstep.h
@@ -104,6 +104,10 @@ enum instruction_type {
#define MKOP(t, f, s) ((t) | (f) | SIZE(s))
+/* Prefix instruction operands */
+#define GET_PREFIX_RA(i) (((i) >> 16) & 0x1f)
+#define GET_PREFIX_R(i) ((i) & (1ul << 20))
+
struct instruction_op {
int type;
int reg;