[PATCH v2 31/47] s390: Add optional operand M3 to .insn pseudo-mnemonic rxe
Jens Remus
jremus@linux.ibm.com
Fri Nov 6 15:57:21 GMT 2026
The RXE instruction format has an optional M3 mask field. Add this
mask operand to the pseudo-mnemonic rxe as optional to enable coding
of all operands in a backward compatible manner.
While at it add comments to ESA/390 .insn pseudo-mnemonic test.
opcodes/
* s390-opc.c (s390_opformats): Add optional operand M3 to
pseudo-mnemonic rxe.
gas/
* doc/c-s390.texi (s390 Formats): Document RXE operand M3 as
optional.
gas/testsuite/
* gas/s390/esa-operands.d (rxe): Add comment.
* gas/s390/esa-operands.s (rxe): Likewise.
* gas/s390/zarch-operands.d: Add tests for .insn rxe.
* gas/s390/zarch-operands.s: Likewise.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
gas/doc/c-s390.texi | 8 ++++----
gas/testsuite/gas/s390/esa-operands.d | 1 +
gas/testsuite/gas/s390/esa-operands.s | 2 +-
gas/testsuite/gas/s390/zarch-operands.d | 3 +++
gas/testsuite/gas/s390/zarch-operands.s | 2 ++
opcodes/s390-opc.c | 2 +-
6 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/gas/doc/c-s390.texi b/gas/doc/c-s390.texi
index 5de8f80465e6..3b47ba42886e 100644
--- a/gas/doc/c-s390.texi
+++ b/gas/doc/c-s390.texi
@@ -611,11 +611,11 @@ with the @samp{.insn} pseudo directive:
0 8 12 16 20 31
@end verbatim
-@item RXE format: <insn> R1,D2(X2,B2)
+@item RXE format: <insn> R1,D2(X2,B2)[,M3]
@verbatim
-+---------+----+----+----+--------------+---------+---------+
-| OpCode | R1 | X2 | B2 | D2 |/////////| OpCode |
-+---------+----+----+----+--------------+---------+---------+
++---------+----+----+----+--------------+----+----+---------+
+| OpCode | R1 | X2 | B2 | D2 | M3 |////| OpCode |
++---------+----+----+----+--------------+----+----+---------+
0 8 12 16 20 32 40 47
@end verbatim
diff --git a/gas/testsuite/gas/s390/esa-operands.d b/gas/testsuite/gas/s390/esa-operands.d
index 5f024d45f9ec..ed280bb9d2f3 100644
--- a/gas/testsuite/gas/s390/esa-operands.d
+++ b/gas/testsuite/gas/s390/esa-operands.d
@@ -25,6 +25,7 @@ Disassembly of section .text:
.*: R_390_PC16DBL test_rsi\+0x2
# RX
.*: 58 13 40 02 [ ]*l %r1,2\(%r3,%r4\)
+# RXE
.*: ed 10 30 02 00 1a [ ]*adb %f1,2\(%r3\)
.*: ed 24 50 03 10 1e [ ]*madb %f1,%f2,3\(%r4,%r5\)
.*: b2 33 20 01 [ ]*ssch 1\(%r2\)
diff --git a/gas/testsuite/gas/s390/esa-operands.s b/gas/testsuite/gas/s390/esa-operands.s
index d3434744d085..a47f83668a55 100644
--- a/gas/testsuite/gas/s390/esa-operands.s
+++ b/gas/testsuite/gas/s390/esa-operands.s
@@ -9,7 +9,7 @@ foo:
.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) # l %r1,2(%r3,%r4)
- .insn rxe,0xed000000001a,%f1,2(%r3)
+ .insn rxe,0xed000000001a,%f1,2(%r3) # adb %f1,2(%r3)
.insn rxf,0xed000000001e,%f1,%f2,3(%r4,%r5)
.insn s,0xb2330000,1(%r2)
.insn si,0x92000000,1(%r2),3
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index 9111a3139752..9d79e7c6802e 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -110,5 +110,8 @@ Disassembly of section .text:
.*: 5a 13 20 de [ ]*a %r1,222\(%r3,%r2\)
# RX-b
.*: 47 13 20 de [ ]*bo 222\(%r3,%r2\)
+# RXE
+.*: ed 13 20 de 00 25 [ ]*lxd %f1,222\(%r3,%r2\)
+.*: e7 13 20 de 30 27 [ ]*lcbb %r1,222\(%r3,%r2\),3
.*: 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 14cbe1b094dd..881fb2c11874 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -54,4 +54,6 @@ foo:
.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 rxe,0xed0000000025,%f1,222(%r3,%r2) # lxd %f1,222(%r3,%r2)
+ .insn rxe,0xe70000000027,%r1,222(%r3,%r2),3 # lcbb %r1,222(%r3,%r2),3
.insn ssf,0xc80000000000,1(%r2),3(%r4),%r5
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index 1361966b763b..c43f87846c95 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -846,7 +846,7 @@ const struct s390_opcode s390_opformats[] =
{ "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 },
+ { "rxe", OP8(0x00LL), MASK_RXE_RRRDU, INSTR_RXE_RRRDU, 3, 0, 256|1, 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 },
{ "s", OP8(0x00LL), MASK_S_RD, INSTR_S_RD, 3, 0, 256, NULL },
--
2.53.0
More information about the Binutils
mailing list