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

AArch64: Add an assert to inherent_reg_qualifier.

The default case in `inherent_reg_qualifier` is unreachable, so replace it with an assert.

In the AArch64 assembler, the inherent_reg_qualifier function determines the operand qualifier associated with a given register. The default case in this function should be unreachable. This commit replaces the default case with an assert to catch unexpected behavior during development.

In Details

The AArch64 port's inherent_reg_qualifier in gas/config/tc-aarch64.c determines the operand qualifier for a register. The default case was expected to be unreachable. This change replaces the default return with gas_assert (0) to catch unexpected cases during development.

For Context

The GNU Assembler (GAS) translates assembly code into machine code. For AArch64, GAS needs to determine the correct qualifiers for registers based on their usage. This commit adds a check to ensure that a specific code path, intended to be unreachable, remains so. If this code path is ever executed, the assembler will now halt with an assertion, signaling a bug.

Filed Under: aarch64assemblerbugfix