binutils Newspaper
JUNE 20, 2026
aarch64 Proposed

Aarch64: Remove redundant element size checks

Simplifies `get_data_pattern` by removing redundant checks on qualifier element sizes, assuming prior equality checks suffice.

This patch removes redundant checks for element size equality in the get_data_pattern function within opcodes/aarch64-opc.c. Because the code already checks that the qualifiers are equal, checking their element sizes is redundant.

In Details

The patch simplifies opcodes/aarch64-opc.c::get_data_pattern by removing redundant size checks. Code like (aarch64_get_qualifier_esize (qualifiers[0]) == aarch64_get_qualifier_esize (qualifiers[1])) is removed because the qualifiers themselves are already checked for equality.

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 removes duplicate checks, cleaning up the code.

Filed Under: aarch64assemblerredundant checkcode simplification