[binutils-gdb] s390: Make M3 operand optional in .insn pseudo-mnemonic vrv
Jens Remus
jremus@sourceware.org
Tue Nov 10 16:51:36 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0a4333649abe49c21aa0a0cad74ff4abc30978fa
commit 0a4333649abe49c21aa0a0cad74ff4abc30978fa
Author: Jens Remus <jremus@linux.ibm.com>
Date: Tue Nov 10 17:46:03 2026 +0100
s390: Make M3 operand optional in .insn pseudo-mnemonic vrv
The VRV instruction format has an optional M3 mask field. Make this
mask field in the .insn pseudo-mnemonic vrv optional.
opcodes/
* s390-opc.c (s390_opformats): Make M3 operand optional in
pseudo-mnemonic vrv.
gas/
* doc/c-s390.texi (s390 Formats): Document VRV operand M3 as
optional.
gas/testsuite/
* gas/s390/zarch-operands.d: Add test for .insn vrv.
* 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 5848be3fe0d..a6cabf33c26 100644
--- a/gas/doc/c-s390.texi
+++ b/gas/doc/c-s390.texi
@@ -701,7 +701,7 @@ with the @samp{.insn} pseudo directive:
0 8 12 16 20 32 36 47
@end verbatim
-@item VRV format: <insn> V1,D2(V2,B2),M3
+@item VRV format: <insn> V1,D2(V2,B2)[,M3]
@verbatim
+---------+----+----+----+--------------+----+--------------+
| OpCode | V1 | V2 | B2 | D2 | M3 | OpCode |
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index 411fd7ce003..854e0097c67 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -227,4 +227,7 @@ Disassembly of section .text:
.*: e7 13 20 de 40 21 [ ]*vlgv %r1,%v3,222\(%r2\),4
# VRS-d
.*: e6 03 20 de 10 37 [ ]*vlrlr %v1,%r3,222\(%r2\)
+# 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
#?.*: 07 07 [ ]*nopr %r7
diff --git a/gas/testsuite/gas/s390/zarch-operands.s b/gas/testsuite/gas/s390/zarch-operands.s
index 37bb12d1a34..17cf36d0ff8 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -124,3 +124,5 @@ foo:
.insn vrs_b,0xe70000000022,%v1,222(%r2),%r3 # vlvg %v1,%r3,222(%r2)
.insn vrs_c,0xe70000000021,%r1,222(%r2),%v3,4 # vlgv %r1,%v3,222(%r2),4
.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)
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index e66731b25be..6c7d05dc39d 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -906,6 +906,7 @@ const struct s390_opcode s390_opformats[] =
{ "vrs_b",OP8(0x00LL), MASK_VRS_VRRDU2, INSTR_VRS_VRRDU2, 2, 9, 256|1, NULL },
{ "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 },
{ "vsi", OP8(0x00LL), MASK_VSI_URDV, INSTR_VSI_URDV, 2, 10, 256, NULL },
};
More information about the Binutils-cvs
mailing list