[v1] PowerPC: Support for Load/Store VSX Vector Paired Byte*32 Indexed (RFC02678)

Message ID 20250915175740.143728-1-abhay@linux.ibm.com
State New
Headers
Series [v1] PowerPC: Support for Load/Store VSX Vector Paired Byte*32 Indexed (RFC02678) |

Commit Message

Abhay Kandpal Sept. 15, 2025, 5:57 p.m. UTC
  opcodes/
	* ppc-opc.c (powerpc_opcodes): Add lxvpb32x, stxvpb32x.

gas/
	* testsuite/gas/ppc/future.s: New test.
	* testsuite/gas/ppc/future.d: Likewise.
---
This patch is reg tested

 gas/testsuite/gas/ppc/future.d | 2 ++
 gas/testsuite/gas/ppc/future.s | 2 ++
 opcodes/ppc-opc.c              | 4 ++++
 3 files changed, 8 insertions(+)
  

Comments

Surya Kumari Jangala Oct. 22, 2025, 5:19 p.m. UTC | #1
Hi Abhay,

On 15/09/25 11:27 pm, Abhay Kandpal wrote:
> opcodes/
> 	* ppc-opc.c (powerpc_opcodes): Add lxvpb32x, stxvpb32x.
> 
> gas/
> 	* testsuite/gas/ppc/future.s: New test.
> 	* testsuite/gas/ppc/future.d: Likewise.
> ---
> This patch is reg tested
> 
>  gas/testsuite/gas/ppc/future.d | 2 ++
>  gas/testsuite/gas/ppc/future.s | 2 ++
>  opcodes/ppc-opc.c              | 4 ++++
>  3 files changed, 8 insertions(+)
> 
> diff --git a/gas/testsuite/gas/ppc/future.d b/gas/testsuite/gas/ppc/future.d
> index 645efd24e1b..19e96fac345 100644
> --- a/gas/testsuite/gas/ppc/future.d
> +++ b/gas/testsuite/gas/ppc/future.d
> @@ -104,4 +104,6 @@ Disassembly of section \.text:
>  .*:	(83 c9 e3 11|11 e3 c9 83) 	vupkint8tobf16 v15,v25,1
>  .*:	(83 c1 17 12|12 17 c1 83) 	vupkint4tofp32 v16,v24,7
>  .*:	(83 b9 2f 12|12 2f b9 83) 	vupkint8tofp32 v17,v23,3
> +.*:	(da 9e 72 7c|7c 72 9e da) 	lxvpb32x vs34,r18,r19
> +.*:	(da af 74 7c|7c 74 af da) 	stxvpb32x vs34,r20,r21
>  #pass
> diff --git a/gas/testsuite/gas/ppc/future.s b/gas/testsuite/gas/ppc/future.s
> index 0f00299aa25..492b963c96c 100644
> --- a/gas/testsuite/gas/ppc/future.s
> +++ b/gas/testsuite/gas/ppc/future.s
> @@ -78,4 +78,6 @@ _start:
>  	vupkint8tobf16 15, 25, 1
>  	vupkint4tofp32 16, 24, 7
>  	vupkint8tofp32 17, 23, 3
> +	lxvpb32x 34, 18, 19
> +	stxvpb32x 34, 20, 21
>  
> diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
> index 028295abc2f..692c962c9e3 100644
> --- a/opcodes/ppc-opc.c
> +++ b/opcodes/ppc-opc.c
> @@ -8935,6 +8935,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
>  
>  {"lxvb16x",	X(31,876),	XX1_MASK,    PPCVSX3,	0,		{XT6, RA0, RB}},
>  
> +{"lxvpb32x",	X(31,877),	XX1_MASK,    FUTURE,	0,		{XTP, RA0, RB}},

It is incorrect to use the XX1_MASK here and for 'stxvpb32x'. This mask has a 0
in the 31st bit whereas we want a 1.
Check if there is an existing mask that you can reuse, or create a new one.

-Surya

> +
>  {"tabortdci.",	XRC(31,878,1),	X_MASK,	     PPCHTM,	0,		{TO, RA, HTM_SI}},
>  
>  {"rmieg",	X(31,882),	XRTRA_MASK,  POWER9,	0,		{RB}},
> @@ -9073,6 +9075,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
>  
>  {"stxvb16x",	X(31,1004),	XX1_MASK,    PPCVSX3,	0,		{XS6, RA0, RB}},
>  
> +{"stxvpb32x",	X(31,1005),	XX1_MASK,    FUTURE,	0,		{XSP, RA0, RB}},
> +
>  {"trechkpt.",	XRC(31,1006,1),	XRTRARB_MASK,PPCHTM,	0,		{0}},
>  
>  {"tlbli",	X(31,1010),	XRTRA_MASK,  PPC,	TITAN,		{RB}},
  
Abhay Kandpal Oct. 24, 2025, 9:16 a.m. UTC | #2
Hi Surya,

Please find below the updated patch with comments incorporated.

Regards

Abhay Kandpal


On 22/10/25 22:49, Surya Kumari Jangala wrote:
> k if there is an existing mask that you can reuse, or create a new one.

 From 11f2fdd38820a9e7afd2c2a1bf3e42ba8f5e652c Mon Sep 17 00:00:00 2001
From: Abhay Kandpal <abhay@linux.ibm.com>
Date: Fri, 24 Oct 2025 03:13:49 -0500
Subject: [PATCH v2] PowerPC: Support for Load/Store VSX Vector Paired 
Byte*32
  Indexed (RFC02678)

opcodes/
     * ppc-opc.c (powerpc_opcodes): Add lxvpb32x, stxvpb32x.

gas/
     * testsuite/gas/ppc/future.s: New test.
     * testsuite/gas/ppc/future.d: Likewise.
---
This patch is reg tested.

  gas/testsuite/gas/ppc/future.d | 2 ++
  gas/testsuite/gas/ppc/future.s | 2 ++
  opcodes/ppc-opc.c              | 4 ++++
  3 files changed, 8 insertions(+)

diff --git a/gas/testsuite/gas/ppc/future.d b/gas/testsuite/gas/ppc/future.d
index 645efd24e1b..19e96fac345 100644
--- a/gas/testsuite/gas/ppc/future.d
+++ b/gas/testsuite/gas/ppc/future.d
@@ -104,4 +104,6 @@ Disassembly of section \.text:
  .*:    (83 c9 e3 11|11 e3 c9 83)     vupkint8tobf16 v15,v25,1
  .*:    (83 c1 17 12|12 17 c1 83)     vupkint4tofp32 v16,v24,7
  .*:    (83 b9 2f 12|12 2f b9 83)     vupkint8tofp32 v17,v23,3
+.*:    (da 9e 72 7c|7c 72 9e da)     lxvpb32x vs34,r18,r19
+.*:    (da af 74 7c|7c 74 af da)     stxvpb32x vs34,r20,r21
  #pass
diff --git a/gas/testsuite/gas/ppc/future.s b/gas/testsuite/gas/ppc/future.s
index 0f00299aa25..492b963c96c 100644
--- a/gas/testsuite/gas/ppc/future.s
+++ b/gas/testsuite/gas/ppc/future.s
@@ -78,4 +78,6 @@ _start:
      vupkint8tobf16 15, 25, 1
      vupkint4tofp32 16, 24, 7
      vupkint8tofp32 17, 23, 3
+    lxvpb32x 34, 18, 19
+    stxvpb32x 34, 20, 21

diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 028295abc2f..08d6a38d22f 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -8935,6 +8935,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {

  {"lxvb16x",    X(31,876),    XX1_MASK,    PPCVSX3,    0, {XT6, RA0, RB}},

+{"lxvpb32x",    X(31,877),    X_MASK,      FUTURE,    0, {XTP, RA0, RB}},
+
  {"tabortdci.",    XRC(31,878,1),    X_MASK,         PPCHTM, 0,        
{TO, RA, HTM_SI}},

  {"rmieg",    X(31,882),    XRTRA_MASK,  POWER9,    0, {RB}},
@@ -9073,6 +9075,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {

  {"stxvb16x",    X(31,1004),    XX1_MASK,    PPCVSX3,    0, {XS6, RA0, 
RB}},

+{"stxvpb32x",    X(31,1005),    X_MASK,      FUTURE,    0, {XSP, RA0, RB}},
+
  {"trechkpt.",    XRC(31,1006,1),    XRTRARB_MASK,PPCHTM,    0,     {0}},

  {"tlbli",    X(31,1010),    XRTRA_MASK,  PPC,    TITAN, {RB}},
  
Surya Kumari Jangala Oct. 24, 2025, 2:34 p.m. UTC | #3
Hi Abhay,
I am not able to apply this patch. Can you please resend it?

Also, updated patches should be sent as a new email, and not as a reply
to the previous version email.

You should specify what has changed from the previous version,
something like:

Changes from v1->v2:
<list down the changes>

On 24/10/25 2:46 pm, Abhay Kandpal wrote:
> diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
> index 028295abc2f..08d6a38d22f 100644
> --- a/opcodes/ppc-opc.c
> +++ b/opcodes/ppc-opc.c
> @@ -8935,6 +8935,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
> 
>  {"lxvb16x",    X(31,876),    XX1_MASK,    PPCVSX3,    0, {XT6, RA0, RB}},
> 
> +{"lxvpb32x",    X(31,877),    X_MASK,      FUTURE,    0, {XTP, RA0, RB}},

s/FUTURE/PPCVSXF

> +
>  {"tabortdci.",    XRC(31,878,1),    X_MASK,         PPCHTM, 0,        {TO, RA, HTM_SI}},
> 
>  {"rmieg",    X(31,882),    XRTRA_MASK,  POWER9,    0, {RB}},
> @@ -9073,6 +9075,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
> 
>  {"stxvb16x",    X(31,1004),    XX1_MASK,    PPCVSX3,    0, {XS6, RA0, RB}},
> 
> +{"stxvpb32x",    X(31,1005),    X_MASK,      FUTURE,    0, {XSP, RA0, RB}},

Ditto.

-Surya
  

Patch

diff --git a/gas/testsuite/gas/ppc/future.d b/gas/testsuite/gas/ppc/future.d
index 645efd24e1b..19e96fac345 100644
--- a/gas/testsuite/gas/ppc/future.d
+++ b/gas/testsuite/gas/ppc/future.d
@@ -104,4 +104,6 @@  Disassembly of section \.text:
 .*:	(83 c9 e3 11|11 e3 c9 83) 	vupkint8tobf16 v15,v25,1
 .*:	(83 c1 17 12|12 17 c1 83) 	vupkint4tofp32 v16,v24,7
 .*:	(83 b9 2f 12|12 2f b9 83) 	vupkint8tofp32 v17,v23,3
+.*:	(da 9e 72 7c|7c 72 9e da) 	lxvpb32x vs34,r18,r19
+.*:	(da af 74 7c|7c 74 af da) 	stxvpb32x vs34,r20,r21
 #pass
diff --git a/gas/testsuite/gas/ppc/future.s b/gas/testsuite/gas/ppc/future.s
index 0f00299aa25..492b963c96c 100644
--- a/gas/testsuite/gas/ppc/future.s
+++ b/gas/testsuite/gas/ppc/future.s
@@ -78,4 +78,6 @@  _start:
 	vupkint8tobf16 15, 25, 1
 	vupkint4tofp32 16, 24, 7
 	vupkint8tofp32 17, 23, 3
+	lxvpb32x 34, 18, 19
+	stxvpb32x 34, 20, 21
 
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 028295abc2f..692c962c9e3 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -8935,6 +8935,8 @@  const struct powerpc_opcode powerpc_opcodes[] = {
 
 {"lxvb16x",	X(31,876),	XX1_MASK,    PPCVSX3,	0,		{XT6, RA0, RB}},
 
+{"lxvpb32x",	X(31,877),	XX1_MASK,    FUTURE,	0,		{XTP, RA0, RB}},
+
 {"tabortdci.",	XRC(31,878,1),	X_MASK,	     PPCHTM,	0,		{TO, RA, HTM_SI}},
 
 {"rmieg",	X(31,882),	XRTRA_MASK,  POWER9,	0,		{RB}},
@@ -9073,6 +9075,8 @@  const struct powerpc_opcode powerpc_opcodes[] = {
 
 {"stxvb16x",	X(31,1004),	XX1_MASK,    PPCVSX3,	0,		{XS6, RA0, RB}},
 
+{"stxvpb32x",	X(31,1005),	XX1_MASK,    FUTURE,	0,		{XSP, RA0, RB}},
+
 {"trechkpt.",	XRC(31,1006,1),	XRTRARB_MASK,PPCHTM,	0,		{0}},
 
 {"tlbli",	X(31,1010),	XRTRA_MASK,  PPC,	TITAN,		{RB}},