binutils Newspaper
NOVEMBER 30, 2026
aarch64 — Proposed

aarch64: Use F_OPD0_OPT to combine two gcspopm entries

Consolidates two aarch64 gcspopm opcode entries into one using F_OPD0_OPT for cleaner representation.

This patch refactors the AArch64 opcode table by combining two ‘gcspopm’ entries into a single entry using the F_OPD0_OPT and F_DEFAULT flags. This change aligns with the canonical representation for opcodes with optional operands, simplifying the opcode table and potentially improving decoding efficiency.

In Details

This patch modifies the AArch64 opcode table (aarch64-tbl-2.h and aarch64-dis-2.c) to use the F_OPD0_OPT and F_DEFAULT flags to represent the gcspopm instruction. Previously, this instruction was represented by two separate entries in the table. The change aims to streamline the opcode definition and decoding process within binutils.

For Context
F_OPD0_OPT
A flag used in the AArch64 opcode table to indicate that an operand is optional. This allows a single opcode table entry to represent variations of an instruction based on operand presence.
F_DEFAULT
A flag used in the AArch64 opcode table, often in conjunction with optional operands, to specify default values or behaviors when an operand is omitted.
gcspopm
A specific AArch64 instruction related to stack operations, likely involving popping multiple registers from the stack.
Opcode Table
A data structure used by disassemblers and assemblers to map instruction byte patterns to mnemonic names and vice-versa. In binutils, these tables define the instructions a specific architecture supports.
Filed Under: aarch64binutilsopcoderefactoring