[PATCH v2 26/47] s390: Enhance test for .insn pseudo-mnemonic rse

Jens Remus jremus@linux.ibm.com
Fri Nov 6 15:57:16 GMT 2026


For historic reasons the .insn rse pseudo-mnemonic operand order differs
from the field index order.  Document that.

gas/
	* doc/c-s390.texi (s390 Formats): Document RSE operand order.

gas/testsuite/
	* gas/s390/zarch-operands.d (rse): Enhance test for .insn rse.
	* gas/s390/zarch-operands.s (rse): Likewise.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
 gas/doc/c-s390.texi                     | 1 +
 gas/testsuite/gas/s390/zarch-operands.d | 3 ++-
 gas/testsuite/gas/s390/zarch-operands.s | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gas/doc/c-s390.texi b/gas/doc/c-s390.texi
index f9ae74de6447..2e5c0614b93b 100644
--- a/gas/doc/c-s390.texi
+++ b/gas/doc/c-s390.texi
@@ -425,6 +425,7 @@ a @emph{Programming Note} of the Principles of Operation manual:
   @item RRF-e (@code{rrf_e}): @code{R1,M3,R2[,M4]}
   @end itemize
 @item RS (@code{rs}; not RS-a/b): @code{R1,R3,D2(B2)}
+@item RSE (@code{rse}): @code{R1,R3,D2(B2)}
 @end itemize
 
 An instruction is two, four, or six bytes in length and must be aligned
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index 9f2b90a4e433..a21fcac5a2cb 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -90,6 +90,7 @@ Disassembly of section .text:
 .*:	8f 10 20 de [	 ]*slda	%r1,222\(%r2\)
 # RS-b
 .*:	bd 13 20 de [	 ]*clm	%r1,3,222\(%r2\)
-.*:	eb 12 40 03 00 0d [	 ]*sllg	%r1,%r2,3\(%r4\)
+# RSE
+.*:	eb 13 20 de 00 0d [	 ]*sllg	%r1,%r3,222\(%r2\)
 .*:	c8 50 20 01 40 03 [	 ]*mvcos	1\(%r2\),3\(%r4\),%r5
 #?.*:	07 07 [	 ]*nopr	%r7
diff --git a/gas/testsuite/gas/s390/zarch-operands.s b/gas/testsuite/gas/s390/zarch-operands.s
index 25970a5f65c9..25c268b22e2e 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -44,5 +44,5 @@ foo:
 	.insn rs_a,0x86000000,%r1,222(%r2),%r3		# bxh %r1,%r3,222(%r2)
 	.insn rs_a,0x8f000000,%r1,222(%r2)		# slda %r1,222(%r2)
 	.insn rs_b,0xbd000000,%r1,222(%r2),3		# clm %r1,3,222(%r2)
-	.insn rse,0xeb000000000d,%r1,%r2,3(%r4)
+	.insn rse,0xeb000000000d,%r1,%r3,222(%r2)	# sllg %r1,%r3,222(%r2)
 	.insn ssf,0xc80000000000,1(%r2),3(%r4),%r5
-- 
2.53.0



More information about the Binutils mailing list