[PATCH v2 33/47] s390: Add .insn pseudo-mnemonics rxy_a/b/c
Jens Remus
jremus@linux.ibm.com
Fri Nov 6 15:57:23 GMT 2026
History of instruction format RXY:
- RXY-a got initially introduced as RXY with IBM z990. [1]
- RXY-b got introduced with IBM z10. [2]
- RXY-c got introduced with IBM z17. [3]
Note that the assembler does not evaluate or enforce the specified mode
and minimum architecture/CPU level for .insn pseudo-mnemonics.
[1]: IBM z/Architecture Principles of Operation, SA22-7832-02, IBM z990,
https://publibfp.dhe.ibm.com/epubs/pdf/dz9zr002.pdf
[2]: IBM z/Architecture Principles of Operation, SA22-7832-06, IBM z10,
https://publibfp.dhe.ibm.com/epubs/pdf/dz9zr006.pdf
[3]: IBM z/Architecture Principles of Operation, SA22-7832-14, IBM z17,
https://www.ibm.com/docs/en/module_1678991624569/pdf/SA22-7832-14.pdf
opcodes/
* s390-opc.c (s390_opformats): Add pseudo-mnemonics rxy_a,
rxy_b, and rxy_c.
gas/testsuite/
* gas/s390/zarch-operands.d: Add tests for .insn rxy, rxy_a,
rxy_b, and rxy_c.
* gas/s390/zarch-operands.s: Likewise.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
Notes (jremus):
Changes in v2:
- Correct rxy_b/c mode to z/Architecture (2). (Andreas)
- Reword commit message to no longer claim the minimum architecture/CPU
level would be enforced. (Andreas)
gas/testsuite/gas/s390/zarch-operands.d | 8 ++++++++
gas/testsuite/gas/s390/zarch-operands.s | 4 ++++
opcodes/s390-opc.c | 3 +++
3 files changed, 15 insertions(+)
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index 46a2bffa33e1..7f2976f380df 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -115,5 +115,13 @@ Disassembly of section .text:
.*: e7 13 20 de 30 27 [ ]*lcbb %r1,222\(%r3,%r2\),3
# RXF
.*: ed 34 20 de 10 3e [ ]*mad %f1,%f3,222\(%r4,%r2\)
+# RXY
+.*: e3 12 36 ce 05 08 [ ]*ag %r1,22222\(%r2,%r3\)
+# RXY-a
+.*: e3 12 36 ce 05 08 [ ]*ag %r1,22222\(%r2,%r3\)
+# RXY-b
+.*: e3 12 36 ce 05 36 [ ]*pfd 1,22222\(%r2,%r3\)
+# RXY-c
+.*: e3 12 36 ce 05 60 [ ]*lxab %r1,22222\(%r2,%r3\)
.*: 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 3c1f2c62139a..504ddff43cf5 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -57,4 +57,8 @@ foo:
.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 rxf,0xed000000003e,%f1,%f3,222(%r4,%r2) # mad %f1,%f3,222(%r4,%r2)
+ .insn rxy,0xe30000000008,%r1,22222(%r2,%r3) # ag %r1,22222(%r2,%r3)
+ .insn rxy_a,0xe30000000008,%r1,22222(%r2,%r3) # ag %r1,22222(%r2,%r3)
+ .insn rxy_b,0xe30000000036,1,22222(%r2,%r3) # pfd 1,22222(%r2,%r3)
+ .insn rxy_c,0xe30000000060,%r1,22222(%r2,%r3) # lxab %r1,22222(%r2,%r3)
.insn ssf,0xc80000000000,1(%r2),3(%r4),%r5
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index c43f87846c95..72ffc967c73e 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -849,6 +849,9 @@ const struct s390_opcode s390_opformats[] =
{ "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 },
+ { "rxy_a",OP8(0x00LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 3, 3, 256, NULL },
+ { "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, NULL },
{ "si", OP8(0x00LL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 256, NULL },
{ "sil", OP8(0x00LL), MASK_SIL_RDI, INSTR_SIL_RDI, 2, 6, 256, NULL },
--
2.53.0
More information about the Binutils
mailing list