Aarch64: Add an assert to inherent_reg_qualifier
Adds an assert to the default case of `inherent_reg_qualifier` function in `tc-aarch64.c`, marking it as unreachable.
This patch adds an assert to the default case of the inherent_reg_qualifier function, which should be unreachable. This change clarifies the code’s logic and helps catch potential errors during development by triggering an assertion if the default case is ever reached.
In Details
The patch adds gas_assert (0) to the default case in gas/config/tc-aarch64.c::inherent_reg_qualifier. This function determines operand qualifiers for AArch64 registers. The default case was intended to be unreachable; this change turns it into an assertion, which will halt execution if triggered during assembly.
For Context
binutils is a collection of binary tools such as the assembler, linker, etc. This patch modifies the assembler (gas) for the AArch64 architecture. The assembler translates human-readable assembly code into machine code that a computer can execute. This patch adds a safety check to a function that determines extra properties of registers, to detect unforeseen cases during assembly.