[PATCH v2 27/47] s390: Add test for .insn pseudo-mnemonic rsi

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


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

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

gas/testsuite/
	* gas/s390/esa-operands.d (rsi): Add comment.
	* gas/s390/esa-operands.s (rsi): Likewise.
	* gas/s390/zarch-operands.d: Add test for .insn rsi.
	* gas/s390/zarch-operands.s: Likewise.

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

diff --git a/gas/doc/c-s390.texi b/gas/doc/c-s390.texi
index 2e5c0614b93b..e44b92ee2f6a 100644
--- a/gas/doc/c-s390.texi
+++ b/gas/doc/c-s390.texi
@@ -426,6 +426,7 @@ a @emph{Programming Note} of the Principles of Operation manual:
   @end itemize
 @item RS (@code{rs}; not RS-a/b): @code{R1,R3,D2(B2)}
 @item RSE (@code{rse}): @code{R1,R3,D2(B2)}
+@item RSI (@code{rsi}): @code{R1,R3,RI2}
 @end itemize
 
 An instruction is two, four, or six bytes in length and must be aligned
diff --git a/gas/testsuite/gas/s390/esa-operands.d b/gas/testsuite/gas/s390/esa-operands.d
index e35a3f7b790a..8a52a4e00f30 100644
--- a/gas/testsuite/gas/s390/esa-operands.d
+++ b/gas/testsuite/gas/s390/esa-operands.d
@@ -20,6 +20,7 @@ Disassembly of section .text:
 .*:	b3 5b 34 12 [	 ]*didbr	%f1,%f3,%f2,4
 # RS
 .*:	ba 12 40 03 [	 ]*cs	%r1,%r2,3\(%r4\)
+# RSI
  *([\da-f]+):	84 12 00 00 [	 ]*brxh	%r1,%r2,\1 <foo\+0x\1>
 .*: R_390_PC16DBL	test_rsi\+0x2
 .*:	58 13 40 02 [	 ]*l	%r1,2\(%r3,%r4\)
diff --git a/gas/testsuite/gas/s390/esa-operands.s b/gas/testsuite/gas/s390/esa-operands.s
index 264f4ad14a54..5d24ac6760e6 100644
--- a/gas/testsuite/gas/s390/esa-operands.s
+++ b/gas/testsuite/gas/s390/esa-operands.s
@@ -7,7 +7,7 @@ foo:
 	.insn rre,0xb25e0000,%r1,%r2			# srst %r1,%r2
 	.insn rrf,0xb35b0000,%f1,%f2,%f3,4		# didbr %f1,%f3,%f2,4
 	.insn rs,0xba000000,%r1,%r2,3(%r4)		# cs %r1,%r2,3(%r4)
-	.insn rsi,0x84000000,%r1,%r2,test_rsi
+	.insn rsi,0x84000000,%r1,%r2,test_rsi		# brxh %r1,%r2,test_rsi
 	.insn rx,0x58000000,%r1,2(%r3,%r4)
 	.insn rxe,0xed000000001a,%f1,2(%r3)
 	.insn rxf,0xed000000001e,%f1,%f2,3(%r4,%r5)
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index a21fcac5a2cb..d93752019753 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -92,5 +92,7 @@ Disassembly of section .text:
 .*:	bd 13 20 de [	 ]*clm	%r1,3,222\(%r2\)
 # RSE
 .*:	eb 13 20 de 00 0d [	 ]*sllg	%r1,%r3,222\(%r2\)
+# RSI
+ *([\da-f]+):	84 13 00 00 [	 ]*brxh	%r1,%r3,\1 <foo\+0x\1>
 .*:	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 25c268b22e2e..fb3bce927ba4 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -45,4 +45,5 @@ foo:
 	.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,%r3,222(%r2)	# sllg %r1,%r3,222(%r2)
+	.insn rsi,0x84000000,%r1,%r3,.			# brxh %r1,%r3,.
 	.insn ssf,0xc80000000000,1(%r2),3(%r4),%r5
-- 
2.53.0



More information about the Binutils mailing list