[binutils-gdb] s390: Add .insn pseudo-mnemonics rx_a/b

Jens Remus jremus@sourceware.org
Tue Nov 10 16:50:19 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8f89aa8e855565a605808b410943b9acd757f519

commit 8f89aa8e855565a605808b410943b9acd757f519
Author: Jens Remus <jremus@linux.ibm.com>
Date:   Tue Nov 10 17:46:03 2026 +0100

    s390: Add .insn pseudo-mnemonics rx_a/b
    
    Note that the assembler does not evaluate or enforce the specified mode
    and minimum architecture/CPU level for .insn pseudo-mnemonics.
    
    While at it add a z/Architecture test for .insn rx pseudo-mnemonic.
    
    opcodes/
            * s390-opc.c (s390_opformats): Add pseudo-mnemonics rx_a and
            rx_b.
    
    gas/testsuite/
            * gas/s390/esa-operands.d (rx): Add comment.
            * gas/s390/esa-operands.s (rx): Likewise.
            * gas/s390/zarch-operands.d: Add tests for .insn rx, rx_a, and
            rx_b.
            * gas/s390/zarch-operands.s: Likewise.
    
    Signed-off-by: Jens Remus <jremus@linux.ibm.com>

Diff:
---
 gas/testsuite/gas/s390/esa-operands.d   | 1 +
 gas/testsuite/gas/s390/esa-operands.s   | 2 +-
 gas/testsuite/gas/s390/zarch-operands.d | 6 ++++++
 gas/testsuite/gas/s390/zarch-operands.s | 3 +++
 opcodes/s390-opc.c                      | 2 ++
 5 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/gas/testsuite/gas/s390/esa-operands.d b/gas/testsuite/gas/s390/esa-operands.d
index 8a52a4e00f3..5f024d45f9e 100644
--- a/gas/testsuite/gas/s390/esa-operands.d
+++ b/gas/testsuite/gas/s390/esa-operands.d
@@ -23,6 +23,7 @@ Disassembly of section .text:
 # RSI
  *([\da-f]+):	84 12 00 00 [	 ]*brxh	%r1,%r2,\1 <foo\+0x\1>
 .*: R_390_PC16DBL	test_rsi\+0x2
+# RX
 .*:	58 13 40 02 [	 ]*l	%r1,2\(%r3,%r4\)
 .*:	ed 10 30 02 00 1a [	 ]*adb	%f1,2\(%r3\)
 .*:	ed 24 50 03 10 1e [	 ]*madb	%f1,%f2,3\(%r4,%r5\)
diff --git a/gas/testsuite/gas/s390/esa-operands.s b/gas/testsuite/gas/s390/esa-operands.s
index 5d24ac6760e..d3434744d08 100644
--- a/gas/testsuite/gas/s390/esa-operands.s
+++ b/gas/testsuite/gas/s390/esa-operands.s
@@ -8,7 +8,7 @@ foo:
 	.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		# brxh %r1,%r2,test_rsi
-	.insn rx,0x58000000,%r1,2(%r3,%r4)
+	.insn rx,0x58000000,%r1,2(%r3,%r4)		# l %r1,2(%r3,%r4)
 	.insn rxe,0xed000000001a,%f1,2(%r3)
 	.insn rxf,0xed000000001e,%f1,%f2,3(%r4,%r5)
 	.insn s,0xb2330000,1(%r2)
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index 0dca51aa75c..9111a313975 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -104,5 +104,11 @@ Disassembly of section .text:
 .*:	eb 13 2f ff ff 1d [	 ]*rll	%r1,%r3,-1\(%r2\)
 # RSY-b
 .*:	eb 13 2f ff ff 81 [	 ]*icmy	%r1,3,-1\(%r2\)
+# RX
+.*:	58 13 20 de [	 ]*l	%r1,222\(%r3,%r2\)
+# RX-a
+.*:	5a 13 20 de [	 ]*a	%r1,222\(%r3,%r2\)
+# RX-b
+.*:	47 13 20 de [	 ]*bo	222\(%r3,%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 e463147e76b..14cbe1b094d 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -51,4 +51,7 @@ foo:
 	.insn rsy,0xeb000000001d,%r1,%r3,22222(%r2)	# rll %r1,%r3,22222(%r2)
 	.insn rsy_a,0xeb000000001d,%r1,-1(%r2),%r3	# rll %r1,%r3,-1(%r2)
 	.insn rsy_b,0xeb0000000081,%r1,-1(%r2),3	# icmy %r1,3,-1(%r2)
+	.insn rx,0x58000000,%r1,222(%r3,%r2)		# l %r1,222(%r3,%r2)
+	.insn rx_a,0x5a000000,%r1,222(%r3,%r2)		# a %r1,222(%r3,%r2)
+	.insn rx_b,0x47000000,1,222(%r3,%r2)		# bc 1,222(%r3,%r2)
 	.insn ssf,0xc80000000000,1(%r2),3(%r4),%r5
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index 5c47fe1e698..1361966b763 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -844,6 +844,8 @@ const struct s390_opcode s390_opformats[] =
   { "rsy_a",OP8(0x00LL), MASK_RSY_RRRD2,   INSTR_RSY_RRRD2,   3,  3, 256, NULL },
   { "rsy_b",OP8(0x00LL), MASK_RSY_RURD2,   INSTR_RSY_RURD2,   2,  3, 256, NULL },
   { "rx",   OP8(0x00LL), MASK_RX_RRRD,	   INSTR_RX_RRRD,     3,  0, 256, NULL },
+  { "rx_a", OP8(0x00LL), MASK_RX_RRRD,	   INSTR_RX_RRRD,     3,  0, 256, NULL },
+  { "rx_b", OP8(0x00LL), MASK_RX_URRD,	   INSTR_RX_URRD,     3,  0, 256, NULL },
   { "rxe",  OP8(0x00LL), MASK_RXE_RRRD,	   INSTR_RXE_RRRD,    3,  0, 256, NULL },
   { "rxf",  OP8(0x00LL), MASK_RXF_RRRDR,   INSTR_RXF_RRRDR,   3,  0, 256, NULL },
   { "rxy",  OP8(0x00LL), MASK_RXY_RRRD,	   INSTR_RXY_RRRD,    3,  3, 256, NULL },


More information about the Binutils-cvs mailing list