]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
aarch64: Add missing F_STRICT flags
authorAlice Carlotti <alice.carlotti@arm.com>
Sat, 12 Jul 2025 02:53:21 +0000 (03:53 +0100)
committerAlice Carlotti <alice.carlotti@arm.com>
Sat, 12 Jul 2025 09:04:27 +0000 (10:04 +0100)
commit5bf6d4cd7eb01c54e5ffccc2374aa2a671934c75
treee972fffcb1a75f6cbda3a3988174c53aa714c847
parentf4c12969c393a799e2468b01e71d3d7fddb094f3
aarch64: Add missing F_STRICT flags

By default, NIL qualifiers are treated as matching any qualifier when
checking operand constraints.  For many SVE instructions, this would
allow operands with missing type suffixes to be assembled as if they had
any explicit type specified.  To prevent this, the F_STRICT flag is used
to specify that NIL qualifiers should match only NIL qualifiers.

Unfortunately, several SVE instructions incorrectly omitted this
F_STRICT flag.  The bug has existed in the *MATMUL_SVE* macros since
they were added in 2019.  The macro LUT_SVE2_INSN was added last year,
and the other incorrect macros are new in this release.

LUTv2_SME2_INSN and LUTv2_SME2p1_INSN were not actually broken, because
we reject untyped vector lists already during parsing.  However, I have
added the F_STRICT flag here anyway, since this is more consistent and
would be more robust if those operands start accepting untyped vector
lists in the future.  The new luti4 tests are the only ones that were
already rejected before this change.

BFLOAT16_SVE_INSN has been unused since it was originally added, so I
just deleted the macro.

The SVE LUT instructions were using the lut instruction class, which
has special handling only for SIMD operands, and isn't recognised by
aarch64_decode_variant_using_iclass (which sets the qualifiers during
decode for most SVE instructions).  To prevent these instructions
failing to disassemble, I changed their instruction class to sve_misc.
gas/testsuite/gas/aarch64/sve-missing-qualifiers.d [new file with mode: 0644]
gas/testsuite/gas/aarch64/sve-missing-qualifiers.l [new file with mode: 0644]
gas/testsuite/gas/aarch64/sve-missing-qualifiers.s [new file with mode: 0644]
opcodes/aarch64-tbl.h