[PATCH v2 14/47] s390: Add .insn pseudo-mnemonic ie
Jens Remus
jremus@linux.ibm.com
Fri Nov 6 15:57:04 GMT 2026
Instruction format IE got introduced with IBM zEC12. [1]
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-09, IBM zEC12,
https://publibfp.dhe.ibm.com/epubs/pdf/dz9zr009.pdf
opcodes/
* s390-opc.c (s390_opformats): Add pseudo-mnemonic ie.
gas/
* doc/c-s390.texi (s390 Formats): Document instruction format IE.
gas/testsuite/
* gas/s390/zarch-operands.d: Add test for .insn ie.
* gas/s390/zarch-operands.s: Likewise.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
Notes (jremus):
Changes in v2:
- Reword commit message to no longer claim the minimum architecture/CPU
level would be enforced. (Andreas)
gas/doc/c-s390.texi | 8 ++++++++
gas/testsuite/gas/s390/zarch-operands.d | 2 ++
gas/testsuite/gas/s390/zarch-operands.s | 1 +
opcodes/s390-opc.c | 1 +
4 files changed, 12 insertions(+)
diff --git a/gas/doc/c-s390.texi b/gas/doc/c-s390.texi
index ccc5fdf51114..f870204fe30e 100644
--- a/gas/doc/c-s390.texi
+++ b/gas/doc/c-s390.texi
@@ -454,6 +454,14 @@ with the @samp{.insn} pseudo directive:
0 8 15
@end verbatim
+@item IE format: <insn> I1,I2
+@verbatim
++-------------------+---------+----+----+
+| OpCode |/////////| I1 | I2 |
++-------------------+---------+----+----+
+0 16 24 28 31
+@end verbatim
+
@item RI format: <insn> R1,I2
@verbatim
+---------+----+----+-------------------+
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index 3ee0dbbf9898..20a84e951a5c 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -10,6 +10,8 @@ Disassembly of section .text:
.*: 01 01 [ ]*pr
# I
.*: 0a 01 [ ]*svc 1
+# IE
+.*: b2 fa 00 12 [ ]*niai 1,2
*([\da-f]+): ec 12 00 00 00 45 [ ]*brxlg %r1,%r2,\1 <foo\+0x\1>
.*: R_390_PC16DBL test_rie\+0x2
*([\da-f]+): c0 e5 00 00 00 00 [ ]*brasl %r14,\1 <foo\+0x\1>
diff --git a/gas/testsuite/gas/s390/zarch-operands.s b/gas/testsuite/gas/s390/zarch-operands.s
index e2e7db3d8b4f..afa2325a5a57 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -2,6 +2,7 @@
foo:
.insn e,0x0101 # pr
.insn i,0x0a00,1 # svc 1
+ .insn ie,0xb2fa0000,1,2 # niai 1,2
.insn rie,0xec0000000045,%r1,%r2,test_rie
.insn ril,0xc00500000000,%r14,test_ril
.insn rse,0xeb000000000d,%r1,%r2,3(%r4)
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index 679024dbb137..3dd32c954d66 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -783,6 +783,7 @@ const struct s390_opcode s390_opformats[] =
/*NAME, OPCODE, MASK, INSTR, MODE,CPU,FLAG, DESCRIPTION*/
{ "e", OP8(0x00LL), MASK_E, INSTR_E, 3, 0, 256, NULL },
{ "i", OP8(0x00LL), MASK_I_U, INSTR_I_U, 3, 0, 256, NULL },
+ { "ie", OP8(0x00LL), MASK_IE_UU, INSTR_IE_UU, 2, 8, 256, NULL },
{ "ri", OP8(0x00LL), MASK_RI_RI, INSTR_RI_RI, 3, 0, 256, NULL },
{ "rie", OP8(0x00LL), MASK_RIE_RRP, INSTR_RIE_RRP, 2, 2, 256, NULL },
{ "ril", OP8(0x00LL), MASK_RIL_RP, INSTR_RIL_RP, 3, 2, 256, NULL },
--
2.53.0
More information about the Binutils
mailing list