binutils Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
aarch64

AArch64: Add F_REQUIRES_SP and eliminate QLF_SP and QLF_WSP

The AArch64 assembler now uses the F_REQUIRES_SP flag to enforce stack pointer requirements, simplifying qualifier handling.

This commit introduces a new opcode flag, F_REQUIRES_SP, to enforce the requirement for at least one stack pointer operand in the mov (to/from SP) opcode. This change eliminates the need for the QLF_SP and QLF_WSP qualifiers, simplifying the qualifier-matching logic and removing potentially confusing code.

In Details

This commit refactors the handling of stack pointer operands in the AArch64 assembler. The QLF_SP and QLF_WSP qualifiers, along with the associated logic in opcodes/aarch64-opc.c, were previously used to enforce the stack pointer requirement for certain instructions. This commit replaces this mechanism with the F_REQUIRES_SP flag, which is checked during opcode matching.

For Context

When assembling AArch64 instructions, the assembler needs to ensure that the instructions are used correctly. Some instructions, such as those that move data to or from the stack pointer, have specific requirements for their operands. This commit simplifies the way the assembler enforces these requirements by introducing a new flag that indicates whether an instruction requires a stack pointer operand. This change makes the assembler code easier to understand and maintain.

Filed Under: aarch64assemblerstack pointer