[binutils-gdb] s390: Add .insn pseudo-mnemonics ss_a/b/c/d/e/f
Jens Remus
jremus@sourceware.org
Tue Nov 10 16:51:05 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=11a177e25523628ac7dbdd3678db195e14652755
commit 11a177e25523628ac7dbdd3678db195e14652755
Author: Jens Remus <jremus@linux.ibm.com>
Date: Tue Nov 10 17:46:03 2026 +0100
s390: Add .insn pseudo-mnemonics ss_a/b/c/d/e/f
Note that the assembler does not evaluate or enforce the specified mode
and minimum architecture/CPU level for .insn pseudo-mnemonics.
While at it improve the ESA/390 .insn pseudo-mnemonic test so that one
can understand how the SS-a instruction MVC can be pieced together using
.insn ss, which is format SS-d.
opcodes/
* s390-opc.c (s390_opformats): Add pseudo-mnemonics ss_a, ss_b,
ss_c, ss_d, ss_e, ss_f.
gas/testsuite/
* gas/s390/esa-operands.d (ss): Improve and add comment.
* gas/s390/esa-operands.s (ss): Likewise.
* gas/s390/zarch-operands.d: Add tests for .insn ss, ss_a, ss_b,
ss_c, ss_d, ss_e, ss_f.
* gas/s390/zarch-operands.s: Likewise.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Diff:
---
gas/testsuite/gas/s390/esa-operands.d | 3 ++-
gas/testsuite/gas/s390/esa-operands.s | 2 +-
gas/testsuite/gas/s390/zarch-operands.d | 14 ++++++++++++++
gas/testsuite/gas/s390/zarch-operands.s | 7 +++++++
opcodes/s390-opc.c | 6 ++++++
5 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/gas/testsuite/gas/s390/esa-operands.d b/gas/testsuite/gas/s390/esa-operands.d
index b405c8fea93..50c6b8eddbe 100644
--- a/gas/testsuite/gas/s390/esa-operands.d
+++ b/gas/testsuite/gas/s390/esa-operands.d
@@ -33,6 +33,7 @@ Disassembly of section .text:
.*: 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\)
+# SS
+.*: d2 15 30 01 50 04 [ ]*mvc 1\(22,%r3\),4\(%r5\)
.*: e5 01 20 01 40 03 [ ]*tprot 1\(%r2\),3\(%r4\)
#?.*: 07 07 [ ]*nopr %r7
diff --git a/gas/testsuite/gas/s390/esa-operands.s b/gas/testsuite/gas/s390/esa-operands.s
index 3c97e2fa9b3..55173a90314 100644
--- a/gas/testsuite/gas/s390/esa-operands.s
+++ b/gas/testsuite/gas/s390/esa-operands.s
@@ -13,5 +13,5 @@ foo:
.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 # mvi 1(%r2),3
- .insn ss,0xd20000000000,1(2,%r3),4(%r5),6
+ .insn ss,0xd20000000000,1(((22-1)/16),%r3),4(%r5),((22-1)%16) # mvc 1(22,%r3),4(%r5)
.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 bea809e3cfd..3f6c02ddf47 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -136,5 +136,19 @@ Disassembly of section .text:
.*: eb 00 1b 67 02 71 [ ]*lpswey 11111\(%r1\)
# SMI
*([\da-f]+): c7 10 31 4d 00 00 [ ]*bpp 1,\1 <foo\+0x\1>,333\(%r3\)
+# SS
+.*: d9 14 20 6f 30 de [ ]*mvck 111\(%r1,%r2\),222\(%r3\),%r4
+# SS-a
+.*: d5 0a 10 6f 20 de [ ]*clc 111\(11,%r1\),222\(%r2\)
+# SS-b
+.*: f1 01 10 6f 20 de [ ]*mvo 111\(1,%r1\),222\(2,%r2\)
+# SS-c
+.*: f0 03 10 6f 20 de [ ]*srp 111\(1,%r1\),222\(%r2\),3
+# SS-d
+.*: d9 14 20 6f 30 de [ ]*mvck 111\(%r1,%r2\),222\(%r3\),%r4
+# SS-e
+.*: ef 13 20 de 41 bc [ ]*lmd %r1,%r3,222\(%r2\),444\(%r4\)
+# SS-f
+.*: e1 15 10 6f 20 de [ ]*pku 111\(%r1\),222\(22,%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 68389be557b..0d0fdf59f83 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -69,4 +69,11 @@ foo:
.insn siy,0xeb000000007a,11111(%r1),22 # agsi 11111(%r1),22
.insn siy,0xeb0000000071,11111(%r1) # lpswey 11111(%r1)
.insn smi,0xc70000000000,1,.,333(%r3) # bpp 1,.,333(%r3)
+ .insn ss,0xd90000000000,111(%r1,%r2),222(%r3),%r4 # mvck 111(%r1,%r2),222(%r3),%r4
+ .insn ss_a,0xd50000000000,111(11,%r1),222(%r2) # clc 111(11,%r1),222(%r2)
+ .insn ss_b,0xf10000000000,111(1,%r1),222(2,%r2) # mvo 111(1,%r1),222(2,%r2)
+ .insn ss_c,0xf00000000000,111(1,%r1),222(%r2),3 # srp 111(1,%r1),222(%r2),3
+ .insn ss_d,0xd90000000000,111(%r1,%r2),222(%r3),%r4 # mvck 111(%r1,%r2),222(%r3),%r4
+ .insn ss_e,0xef0000000000,%r1,222(%r2),%r3,444(%r4) # lmd %r1,%r3,222(%r2),444(%r4)
+ .insn ss_f,0xe10000000000,111(%r1),222(22,%r2) # pku 111(%r1),222(22,%r2)
.insn ssf,0xc80000000000,1(%r2),3(%r4),%r5
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index 343c528bd6a..83fded17110 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -858,6 +858,12 @@ const struct s390_opcode s390_opformats[] =
{ "siy", OP8(0x00LL), MASK_SIY_URD, INSTR_SIY_URD, 2, 3, 256|1, NULL },
{ "smi", OP8(0x00LL), MASK_SMI_U0RDP, INSTR_SMI_U0RDP, 2, 8, 256, NULL },
{ "ss", OP8(0x00LL), MASK_SS_RRRDRD, INSTR_SS_RRRDRD, 3, 0, 256, NULL },
+ { "ss_a", OP8(0x00LL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 256, NULL },
+ { "ss_b", OP8(0x00LL), MASK_SS_LLRDRD, INSTR_SS_LLRDRD, 3, 0, 256, NULL },
+ { "ss_c", OP8(0x00LL), MASK_SS_LIRDRD, INSTR_SS_LIRDRD, 3, 0, 256, NULL },
+ { "ss_d", OP8(0x00LL), MASK_SS_RRRDRD, INSTR_SS_RRRDRD, 3, 0, 256, NULL },
+ { "ss_e", OP8(0x00LL), MASK_SS_RRRDRD2, INSTR_SS_RRRDRD2, 3, 0, 256, NULL },
+ { "ss_f", OP8(0x00LL), MASK_SS_L2RDRD, INSTR_SS_L2RDRD, 3, 0, 256, NULL },
{ "sse", OP8(0x00LL), MASK_SSE_RDRD, INSTR_SSE_RDRD, 3, 0, 256, NULL },
{ "ssf", OP8(0x00LL), MASK_SSF_RRDRD, INSTR_SSF_RRDRD, 2, 4, 256, NULL },
{ "vri", OP8(0x00LL), MASK_VRI_VVUUU, INSTR_VRI_VVUUU, 2, 9, 256, NULL },
More information about the Binutils-cvs
mailing list