]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
aarch64: Fix ldst_lo12_determine_real_reloc_type
authorAlice Carlotti <alice.carlotti@arm.com>
Thu, 29 Jan 2026 12:17:24 +0000 (12:17 +0000)
committerAlice Carlotti <alice.carlotti@arm.com>
Fri, 15 May 2026 14:07:18 +0000 (15:07 +0100)
commit6095ea2efce173ec8d91e2452485f63a6ba78abe
treef6d308a1de8e11fdcc5b0814914245d4e1f13be3
parent328a34f0db26d27b16efee84995c03a5d12aa760
aarch64: Fix ldst_lo12_determine_real_reloc_type

Add fallback handling for an invalid choice of opd0_qlf, instead of
hitting an assert when trying to use X registers in byte or half
instructions.

Additionally, simplify the code by inlining the relevant parts of
aarch64_get_expected_qualifer, and by deducing the array index directly
from the qualifier enum values (instead of looking up the element size
and computing its log).

This makes aarch64_get_expected_qualifier unused, so remove it.
gas/config/tc-aarch64.c
gas/testsuite/gas/aarch64/reloc-invalid-qualifiers.d [new file with mode: 0644]
gas/testsuite/gas/aarch64/reloc-invalid-qualifiers.l [new file with mode: 0644]
gas/testsuite/gas/aarch64/reloc-invalid-qualifiers.s [new file with mode: 0644]
include/opcode/aarch64.h
opcodes/aarch64-opc.c