[binutils-gdb] s390: Make I2 operand optional in .insn pseudo-mnemonic si
Jens Remus
jremus@sourceware.org
Tue Nov 10 16:50:45 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b3fe6d927aa1bbcfe1295dc175182f7fc271f520
commit b3fe6d927aa1bbcfe1295dc175182f7fc271f520
Author: Jens Remus <jremus@linux.ibm.com>
Date: Tue Nov 10 17:46:03 2026 +0100
s390: Make I2 operand optional in .insn pseudo-mnemonic si
The SI instruction format has an optional I2 field. Make the I2
operand in the .insn pseudo-mnemonic si optional.
While at it add comments to ESA/390 .insn pseudo-mnemonic test.
opcodes/
* s390-opc.c (s390_opformats): Make I2 operand optional in
pseudo-mnemonic si.
gas/
* doc/c-s390.texi (s390 Formats): Document SI operand I2 as
optional.
gas/testsuite/
* gas/s390/esa-operands.d (si): Add comment.
* gas/s390/esa-operands.s (si): Likewise.
* gas/s390/zarch-operands.d: Add test for .insn si.
* 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/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, 9 insertions(+), 3 deletions(-)
diff --git a/gas/doc/c-s390.texi b/gas/doc/c-s390.texi
index 32e54124c2f..a3954173da4 100644
--- a/gas/doc/c-s390.texi
+++ b/gas/doc/c-s390.texi
@@ -644,7 +644,7 @@ with the @samp{.insn} pseudo directive:
0 16 20 31
@end verbatim
-@item SI format: <insn> D1(B1),I2
+@item SI format: <insn> D1(B1)[,I2]
@verbatim
+---------+---------+----+--------------+
| OpCode | I2 | B1 | D1 |
diff --git a/gas/testsuite/gas/s390/esa-operands.d b/gas/testsuite/gas/s390/esa-operands.d
index 18041c115d5..b405c8fea93 100644
--- a/gas/testsuite/gas/s390/esa-operands.d
+++ b/gas/testsuite/gas/s390/esa-operands.d
@@ -31,6 +31,7 @@ Disassembly of section .text:
.*: ed 24 50 03 10 1e [ ]*madb %f1,%f2,3\(%r4,%r5\)
# S
.*: b2 33 20 01 [ ]*ssch 1\(%r2\)
+# SI
.*: 92 03 20 01 [ ]*mvi 1\(%r2\),3
.*: d2 26 30 01 50 04 [ ]*mvc 1\(39,%r3\),4\(%r5\)
.*: e5 01 20 01 40 03 [ ]*tprot 1\(%r2\),3\(%r4\)
diff --git a/gas/testsuite/gas/s390/esa-operands.s b/gas/testsuite/gas/s390/esa-operands.s
index 6fec8f8801f..3c97e2fa9b3 100644
--- a/gas/testsuite/gas/s390/esa-operands.s
+++ b/gas/testsuite/gas/s390/esa-operands.s
@@ -12,6 +12,6 @@ foo:
.insn rxe,0xed000000001a,%f1,2(%r3) # adb %f1,2(%r3)
.insn rxf,0xed000000001e,%f1,%f2,3(%r4,%r5) # madb %f1,%f2,3(%r4,%r5)
.insn s,0xb2330000,1(%r2) # ssch 1(%r2)
- .insn si,0x92000000,1(%r2),3
+ .insn si,0x92000000,1(%r2),3 # mvi 1(%r2),3
.insn ss,0xd20000000000,1(2,%r3),4(%r5),6
.insn sse,0xe50100000000,1(%r2),3(%r4)
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index 8be8c692202..84634692446 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -126,5 +126,8 @@ Disassembly of section .text:
# S
.*: b2 33 10 6f [ ]*ssch 111\(%r1\)
.*: b2 31 00 00 [ ]*hsch
+# SI
+.*: 95 16 10 6f [ ]*cli 111\(%r1\),22
+.*: 93 00 10 6f [ ]*ts 111\(%r1\)
.*: 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 2b37cd39bf7..2eab03d4cb6 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -63,4 +63,6 @@ foo:
.insn rxy_c,0xe30000000060,%r1,22222(%r2,%r3) # lxab %r1,22222(%r2,%r3)
.insn s,0xb2330000,111(%r1) # ssch 111(%r1)
.insn s,0xb2310000 # hsch
+ .insn si,0x95000000,111(%r1),22 # cli 111(%r1),22
+ .insn si,0x93000000,111(%r1) # ts 111(%r1)
.insn ssf,0xc80000000000,1(%r2),3(%r4),%r5
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index bbc9188c2b2..0079f02b869 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -853,7 +853,7 @@ const struct s390_opcode s390_opformats[] =
{ "rxy_b",OP8(0x00LL), MASK_RXY_URRD, INSTR_RXY_URRD, 2, 6, 256, NULL },
{ "rxy_c",OP8(0x00LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 13, 256, NULL },
{ "s", OP8(0x00LL), MASK_S_RD, INSTR_S_RD, 3, 0, 256|1, NULL },
- { "si", OP8(0x00LL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 256, NULL },
+ { "si", OP8(0x00LL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 256|1, NULL },
{ "sil", OP8(0x00LL), MASK_SIL_RDI, INSTR_SIL_RDI, 2, 6, 256, NULL },
{ "siy", OP8(0x00LL), MASK_SIY_URD, INSTR_SIY_URD, 2, 3, 256, NULL },
{ "ss", OP8(0x00LL), MASK_SS_RRRDRD, INSTR_SS_RRRDRD, 3, 0, 256, NULL },
More information about the Binutils-cvs
mailing list