GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc/aarch64

aarch64: Simplify SME range printing with multi-character operands

SME instruction range generation in AArch64 assembly is cleaner using new internal print operands.

This commit refactors the AArch64 backend for Scalable Matrix Extension (SME) instructions by introducing new internal print operands for specifying ranges. These operands, such as SME_VG_END and SME_RANGE_END3, allow SME instruction patterns to directly describe assembler ranges like 0:<last> without requiring C code blocks to compute the end index. This simplifies the machine description and centralizes range arithmetic within the target’s print operand hook.

In Details

This patch introduces new internal print operands to aarch64-print-operands.def (sme_range_end, SME_VG_END, SME_RANGE_END1, SME_RANGE_END3) and utilizes them in aarch64-sme.md. These operands replace C code blocks previously used to calculate the end of SME assembler ranges (e.g., vector group ranges or slice ranges). The aarch64_print_operand function in aarch64.cc now handles these new modifiers, ensuring the correct range end is printed according to SME syntax.

For Context
SME
Scalable Matrix Extension, an optional extension to the Arm architecture designed for high-performance matrix operations.
print operand
A mechanism within GCC's machine descriptions that defines how operands should be formatted when generating assembly code.
vector group (VG)
In SME, a group of vector registers that can be operated on together.
slice range
A contiguous portion of a vector or matrix, often used in SME operations.
machine description
Configuration files used by GCC to describe the instruction set, registers, and other architecture-specific details of a target processor.
Filed Under: aarch64SMEcodegenrefactor