]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Fix +nopredres, +nols64 and +nomops
authorAndrew Carlotti <andrew.carlotti@arm.com>
Fri, 24 Nov 2023 17:31:51 +0000 (17:31 +0000)
committerAndrew Carlotti <andrew.carlotti@arm.com>
Sat, 16 Dec 2023 00:38:41 +0000 (00:38 +0000)
commit06f64b95bafc06c318efc7b6d7c03cd34fe4be78
tree0aea62739e911cd6a6f91bc1ee494599bc8e6a8b
parent8d30107455f2309854ced3d65fb07dc1f2c357c0
aarch64: Fix +nopredres, +nols64 and +nomops

For native cpu feature detection, certain features have no entry in
/proc/cpuinfo, so have to be assumed to be present whenever the detected
cpu is supposed to support that feature.

However, the logic for this was mistakenly implemented by excluding
these features from part of aarch64_get_extension_string_for_isa_flags.
This function is also used elsewhere when canonicalising explicit
feature sets, which may require removing features that are normally
implied by the specified architecture version.

This change reenables generation of +nopredres, +nols64 and +nomops
during canonicalisation, by relocating the misplaced native cpu
detection logic.

gcc/ChangeLog:

* common/config/aarch64/aarch64-common.cc
(struct aarch64_option_extension): Remove unused field.
(all_extensions): Ditto.
(aarch64_get_extension_string_for_isa_flags): Remove filtering
of features without native detection.
* config/aarch64/driver-aarch64.cc (host_detect_local_cpu):
Explicitly add expected features that lack cpuinfo detection.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/options_set_28.c: New test.
gcc/common/config/aarch64/aarch64-common.cc
gcc/config/aarch64/driver-aarch64.cc
gcc/testsuite/gcc.target/aarch64/options_set_28.c [new file with mode: 0644]