binutils Newspaper
OCTOBER 12, 2026
s390 — Proposed

s390: Add support for three optional operands in dis-/assembly

Enhances s390 assembler and disassembler to support .insn pseudo-mnemonics with up to three optional operands.

This patch introduces support for instruction formats with up to three optional operands for s390 pseudo-mnemonics in the GNU Assembler. It defines new flags S390_INSTR_FLAG_OPTPARM3 and S390_INSTR_FLAG_OPTPARM_MASK and updates gas, opcodes, and include files to handle these extended operand capabilities, specifically for VRR variants.

In the Thread 1 participant
  1. Jens Remus <jremus@linux.ibm.com> proposer

    Adds support for .insn pseudo-mnemonics with three optional trailing operands by defining new flags and updating gas and opcodes components.

In Details

This patch modifies the s390 backend of GNU Binutils (gas and opcodes) to correctly parse and format instructions that can have up to three optional operands, as specified by formats like VRR-a and VRR-c. It introduces new flags and updates logic in tc-s390.c and s390-dis.c to accommodate this.

For Context
.insn
An assembler directive that allows direct insertion of machine instructions using their opcode and operands, often used for undefined or specialized instructions.
pseudo-mnemonic
A symbolic name used in assembly language that corresponds to a machine instruction or a sequence of instructions, often used for convenience or to represent complex operations.
VRR variants
Specific instruction formats within the s390 architecture (e.g., VRR-a, VRR-c) that handle register-to-register operations and can have varying numbers of optional operands.
Filed Under: s390gasassemblerdisassemblerinstruction-formats