]> sourceware.org Git - binutils-gdb.git/commit
aarch64: Support +sme+nosve permissively
authorAndrew Carlotti <andrew.carlotti@arm.com>
Fri, 31 Jan 2025 05:07:30 +0000 (05:07 +0000)
committerAndrew Carlotti <andrew.carlotti@arm.com>
Fri, 31 Jan 2025 15:16:44 +0000 (15:16 +0000)
commit71e59ebefc25c50465e3fe5943a15c5da9120c8c
tree60c3d6c27ffd6b8134019dab3df60fd82464c61f
parent99b90c46110df304b9941dc1a2b38ec6a15774fc
aarch64: Support +sme+nosve permissively

There is inconsistency regarding whether or not +sme implies +sve2 and
whether +nosve2 implies +nosme.  In particular, GCC 14 assumes the
dependency exists, and canonicalises target strings accordingly, whereas
LLVM treats the features as independent.

This patch removes the positive implication while retaining the negative
implication.  This is the more permissive choice in each case, and
allows us to support target strings written with either interpretation
in mind.

This reduces our ability to detect invalid instructions, but we already
can't rely on this detection because gas doesn't know whether functions
might be executed in streaming mode and/or non-streaming mode.

The aarch64_feature_enable_set change is functionally redundant within
this patch.  It is included because the longer term intention is to
instead remove the workaround in aarch64_parse_features, once the
internal feature checks have been modified to support having both
AARCH64_FEATURE_SME set and AARCH64_FEATURE_SVE unset.

Similarly, the dependency from +sme to +fp16 is currently redundant, but
this redundancy relies upon an incorrect dependency from +fcma to +fp16.
This can be fixed in the future, but it might require modifying internal
feature checks for a few FCMA instructions, so it's left unchanged for
now.
gas/config/tc-aarch64.c
gas/doc/c-aarch64.texi
gas/testsuite/gas/aarch64/sme-nosve-1.d [new file with mode: 0644]
gas/testsuite/gas/aarch64/sme-nosve-1.s [new file with mode: 0644]
This page took 0.04865 seconds and 5 git commands to generate.