[binutils-gdb] s390: Make M3 operand optional in .insn pseudo-mnemonic vrx
Jens Remus
jremus@sourceware.org
Tue Nov 10 16:51:41 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bcfb1811ccf869c889373986eeeb0531080132e1
commit bcfb1811ccf869c889373986eeeb0531080132e1
Author: Jens Remus <jremus@linux.ibm.com>
Date: Tue Nov 10 17:46:04 2026 +0100
s390: Make M3 operand optional in .insn pseudo-mnemonic vrx
The VRX instruction format has an optional M3 mask field. Make this
mask operand in the .insn pseudo-mnemonic vrx optional.
opcodes/
* s390-opc.c (s390_opformats): Make M3 operand optional in
pseudo-mnemonic vrx.
gas/
* doc/c-s390.texi (s390 Formats): Document VRX operand M3 as
optional.
gas/testsuite/
* gas/s390/zarch-operands.d: Add test for .insn vrx.
* gas/s390/zarch-operands.s: Likewise.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Diff:
---
gas/doc/c-s390.texi | 2 +-
gas/testsuite/gas/s390/zarch-operands.d | 3 +++
gas/testsuite/gas/s390/zarch-operands.s | 2 ++
opcodes/s390-opc.c | 1 +
4 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gas/doc/c-s390.texi b/gas/doc/c-s390.texi
index a6cabf33c26..effd4046fb7 100644
--- a/gas/doc/c-s390.texi
+++ b/gas/doc/c-s390.texi
@@ -717,7 +717,7 @@ with the @samp{.insn} pseudo directive:
0 8 12 16 28 32 36 47
@end verbatim
-@item VRX format: <insn> V1,D2(R2,B2),M3
+@item VRX format: <insn> V1,D2(R2,B2)[,M3]
@verbatim
+---------+----+----+----+--------------+----+--------------+
| OpCode | V1 | R2 | B2 | D2 | M3 | OpCode |
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index 854e0097c67..12b5586e641 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -230,4 +230,7 @@ Disassembly of section .text:
# VRV
.*: e7 13 20 de 40 13 [ ]*vgef %v1,222\(%v3,%r2\),4
.*: e7 13 20 de 00 13 [ ]*vgef %v1,222\(%v3,%r2\),0
+# VRX
+.*: e7 13 20 de 40 06 [ ]*vl %v1,222\(%r3,%r2\),4
+.*: e7 13 20 de 00 06 [ ]*vl %v1,222\(%r3,%r2\)
#?.*: 07 07 [ ]*nopr %r7
diff --git a/gas/testsuite/gas/s390/zarch-operands.s b/gas/testsuite/gas/s390/zarch-operands.s
index 17cf36d0ff8..3320dd6a330 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -126,3 +126,5 @@ foo:
.insn vrs_d,0xe60000000037,%v1,222(%r2),%r3 # vlrlr %v1,%r3,222(%r2)
.insn vrv,0xe70000000013,%v1,222(%v3,%r2),4 # vgef %v1,222(%v3,%r2),4
.insn vrv,0xe70000000013,%v1,222(%v3,%r2) # vgef %v1,222(%v3,%r2)
+ .insn vrx,0xe70000000006,%v1,222(%r3,%r2),4 # vl %v1,222(%r3,%r2),4
+ .insn vrx,0xe70000000006,%v1,222(%r3,%r2) # vl %v1,222(%r3,%r2)
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index 6c7d05dc39d..a373abca179 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -907,6 +907,7 @@ const struct s390_opcode s390_opformats[] =
{ "vrs_c",OP8(0x00LL), MASK_VRS_RVRDU2, INSTR_VRS_RVRDU2, 2, 9, 256, NULL },
{ "vrs_d",OP8(0x00LL), MASK_VRS_RRDV2, INSTR_VRS_RRDV2, 2, 10, 256, NULL },
{ "vrv", OP8(0x00LL), MASK_VRV_VVXRDU, INSTR_VRV_VVXRDU, 2, 9, 256|1, NULL },
+ { "vrx", OP8(0x00LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 256|1, NULL },
{ "vsi", OP8(0x00LL), MASK_VSI_URDV, INSTR_VSI_URDV, 2, 10, 256, NULL },
};
More information about the Binutils-cvs
mailing list