VSX Vector Paired instructions loads/stores an octword (32 bytes)
from/to storage into two sequential VSRs. Add `analyse_instr()` support
to these new instructions,
        * Load VSX Vector Paired (lxvp)
        * Load VSX Vector Paired Indexed (lxvpx)
        * Prefixed Load VSX Vector Paired (plxvp)
        * Store VSX Vector Paired (stxvp)
        * Store VSX Vector Paired Indexed (stxvpx)
        * Prefixed Store VSX Vector Paired (pstxvp)

Signed-off-by: Balamuruhan S <bal...@linux.ibm.com>
---
 arch/powerpc/lib/sstep.c | 44 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 5abe98216dc2..c92890e71ca7 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -31,6 +31,10 @@ extern char system_call_common[];
 #define XER_OV32       0x00080000U
 #define XER_CA32       0x00040000U
 
+#ifdef CONFIG_VSX
+#define VSX_REGISTER_XTP(rd)   ((((rd) & 1) << 5) | ((rd) & 0xfe))
+#endif
+
 #ifdef CONFIG_PPC_FPU
 /*
  * Functions in ldstfp.S
@@ -2382,6 +2386,13 @@ int analyse_instr(struct instruction_op *op, const 
struct pt_regs *regs,
                        op->vsx_flags = VSX_SPLAT;
                        break;
 
+               case 333:       /* lxvpx */
+                       op->reg = VSX_REGISTER_XTP(rd);
+                       op->type = MKOP(LOAD_VSX, 0, 32);
+                       op->element_size = 32;
+                       op->vsx_flags = VSX_CHECK_VEC;
+                       break;
+
                case 364:       /* lxvwsx */
                        op->reg = rd | ((word & 1) << 5);
                        op->type = MKOP(LOAD_VSX, 0, 4);
@@ -2410,6 +2421,12 @@ int analyse_instr(struct instruction_op *op, const 
struct pt_regs *regs,
                                VSX_CHECK_VEC;
                        break;
                }
+               case 461:       /* stxvpx */
+                       op->reg = VSX_REGISTER_XTP(rd);
+                       op->type = MKOP(STORE_VSX, 0, 32);
+                       op->element_size = 32;
+                       op->vsx_flags = VSX_CHECK_VEC;
+                       break;
                case 524:       /* lxsspx */
                        op->reg = rd | ((word & 1) << 5);
                        op->type = MKOP(LOAD_VSX, 0, 4);
@@ -2651,6 +2668,21 @@ int analyse_instr(struct instruction_op *op, const 
struct pt_regs *regs,
 #endif
 
 #ifdef CONFIG_VSX
+       case 6:
+               op->ea = dqform_ea(word, regs);
+               op->reg = VSX_REGISTER_XTP(rd);
+               op->element_size = 32;
+               op->vsx_flags = VSX_CHECK_VEC;
+               switch (word & 0xf) {
+               case 0:         /* lxvp */
+                       op->type = MKOP(LOAD_VSX, 0, 32);
+                       break;
+               case 1:         /* stxvp */
+                       op->type = MKOP(STORE_VSX, 0, 32);
+                       break;
+               }
+               break;
+
        case 61:        /* stfdp, lxv, stxsd, stxssp, stxv */
                switch (word & 7) {
                case 0:         /* stfdp with LSB of DS field = 0 */
@@ -2779,12 +2811,24 @@ int analyse_instr(struct instruction_op *op, const 
struct pt_regs *regs,
                        case 57:        /* pld */
                                op->type = MKOP(LOAD, PREFIXED, 8);
                                break;
+                       case 58:        /* plxvp */
+                               op->reg = VSX_REGISTER_XTP(rd);
+                               op->type = MKOP(LOAD_VSX, PREFIXED, 32);
+                               op->element_size = 32;
+                               op->vsx_flags = VSX_CHECK_VEC;
+                               break;
                        case 60:        /* stq */
                                op->type = MKOP(STORE, PREFIXED, 16);
                                break;
                        case 61:        /* pstd */
                                op->type = MKOP(STORE, PREFIXED, 8);
                                break;
+                       case 62:        /* pstxvp */
+                               op->reg = VSX_REGISTER_XTP(rd);
+                               op->type = MKOP(STORE_VSX, PREFIXED, 32);
+                               op->element_size = 32;
+                               op->vsx_flags = VSX_CHECK_VEC;
+                               break;
                        }
                        break;
                case 1: /* Type 01 Eight-Byte Register-to-Register */

base-commit: 64677779e8962c20b580b471790fe42367750599
-- 
2.24.1

Reply via email to