[PATCH v2 28/47] s390: Add .insn pseudo-mnemonics rsl_a/b
Jens Remus
jremus@linux.ibm.com
Fri Nov 6 15:57:18 GMT 2026
History of instruction format RSL:
- RSL-a got initially introduced as RSL. [1, 2, 3]
- RSL-b got introduced with IBM zEC12. [4]
Note that the assembler does not evaluate or enforce the specified mode
and minimum architecture/CPU level for .insn pseudo-mnemonics.
[1]: IBM ESA/390 Principles of Operation, SA22-7201-07, IBM z900,
https://publibfp.dhe.ibm.com/epubs/pdf/dz9ar007.pdf
[2]: IBM z/Architecture Principles of Operation, SA22-7832-00, IBM z900,
https://publibfp.dhe.ibm.com/epubs/pdf/dz9zr000.pdf
[3]: IBM z/Architecture Principles of Operation, SA22-7832-01,
https://publibfp.dhe.ibm.com/epubs/pdf/dz9zr001.pdf
[4]: IBM z/Architecture Principles of Operation, SA22-7832-09, IBM zEC12,
https://publibfp.dhe.ibm.com/epubs/pdf/dz9zr009.pdf
opcodes/
* s390-opc.c (s390_opformats): Add pseudo-mnemonics rsl_a and
rsl_b.
gas/testsuite/
* gas/s390/zarch-operands.d: Add tests for .insn rsl_a and
rsl_b.
* gas/s390/zarch-operands.s: Likewise.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
Notes (jremus):
Changes in v2:
- Correct rsl_b 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 | 4 ++++
gas/testsuite/gas/s390/zarch-operands.s | 2 ++
opcodes/s390-opc.c | 4 ++++
3 files changed, 10 insertions(+)
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index d93752019753..9e599ffc3900 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -94,5 +94,9 @@ Disassembly of section .text:
.*: eb 13 20 de 00 0d [ ]*sllg %r1,%r3,222\(%r2\)
# RSI
*([\da-f]+): 84 13 00 00 [ ]*brxh %r1,%r3,\1 <foo\+0x\1>
+# RSL-a
+.*: eb a0 10 6f 00 c0 [ ]*tp 111\(11,%r1\)
+# RSL-b
+.*: ed 15 20 de 13 ae [ ]*cdpt %f1,222\(22,%r2\),3
.*: 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 fb3bce927ba4..e2aa8c8504de 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -46,4 +46,6 @@ foo:
.insn rs_b,0xbd000000,%r1,222(%r2),3 # clm %r1,3,222(%r2)
.insn rse,0xeb000000000d,%r1,%r3,222(%r2) # sllg %r1,%r3,222(%r2)
.insn rsi,0x84000000,%r1,%r3,. # brxh %r1,%r3,.
+ .insn rsl_a,0xeb00000000c0,111(11,%r1) # tp 111(11,%r1)
+ .insn rsl_b,0xed00000000ae,%f1,222(22,%r2),3 # cdpt %f1,222(22,%r2),3
.insn ssf,0xc80000000000,1(%r2),3(%r4),%r5
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index 586fef971ada..b6e6ac16f7a9 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -425,6 +425,7 @@ unused_s390_operands_static_asserts (void)
#define INSTR_RSL_R0RD 6, { D_20,L4_8,B_16,0,0,0 } /* e.g. tp */
#define INSTR_RSL_LRDFU 6, { F_32,D_20,L8_8,B_16,U4_36,0 } /* e.g. cdzt */
#define INSTR_RSL_LRDFEU 6, { FE_32,D_20,L8_8,B_16,U4_36,0 } /* e.g. cxzt */
+#define INSTR_RSL_LRDRU 6, { R_32,D_20,L8_8,B_16,U4_36,0 } /* e.g. .insn rsl_b */
#define INSTR_RSI_RRP 4, { R_8,R_12,J16_16,0,0,0 } /* e.g. brxh */
#define INSTR_RSY_RRRD 6, { R_8,R_12,D20_20,B_16,0,0 } /* e.g. stmy */
#define INSTR_RSY_RERERD 6, { RE_8,RE_12,D20_20,B_16,0,0 } /* e.g. cdsy */
@@ -668,6 +669,7 @@ unused_s390_operands_static_asserts (void)
#define MASK_RSL_R0RD { 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff }
#define MASK_RSL_LRDFU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSL_LRDFEU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RSL_LRDRU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSI_RRP { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RS_AARD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RS_CCRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
@@ -834,6 +836,8 @@ const struct s390_opcode s390_opformats[] =
{ "rs_b", OP8(0x00LL), MASK_RS_RURD2, INSTR_RS_RURD2, 3, 0, 256, NULL },
{ "rse", OP8(0x00LL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 3, 0, 256, NULL },
{ "rsi", OP8(0x00LL), MASK_RSI_RRP, INSTR_RSI_RRP, 3, 0, 256, NULL },
+ { "rsl_a",OP8(0x00LL), MASK_RSL_R0RD, INSTR_RSL_R0RD, 3, 0, 256, NULL },
+ { "rsl_b",OP8(0x00LL), MASK_RSL_LRDRU, INSTR_RSL_LRDRU, 2, 8, 256, NULL },
{ "rsy", OP8(0x00LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 3, 3, 256, NULL },
{ "rx", OP8(0x00LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 256, NULL },
{ "rxe", OP8(0x00LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 3, 0, 256, NULL },
--
2.53.0
More information about the Binutils
mailing list