diff options
author | Balamuruhan S <[email protected]> | 2020-06-26 15:21:57 +0530 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2020-07-23 17:43:11 +1000 |
commit | 68a180a44c29d7e918ae7d3c18a01b0751d1c22f (patch) | |
tree | 42bc480606bcbe80cedc3123b108d9c462488c67 /arch/powerpc/include/asm/sstep.h | |
parent | 7e67c73b939b25d4ad18a536e52282aa35d8ee56 (diff) |
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 <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch/powerpc/include/asm/sstep.h')
-rw-r--r-- | arch/powerpc/include/asm/sstep.h | 4 |
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; |