]> gcc.gnu.org Git - gcc.git/commit
aarch64: Fix +nocrypto handling
authorAndrew Carlotti <andrew.carlotti@arm.com>
Fri, 24 Nov 2023 17:06:07 +0000 (17:06 +0000)
committerAndrew Carlotti <andrew.carlotti@arm.com>
Sat, 16 Dec 2023 00:38:40 +0000 (00:38 +0000)
commit8d30107455f2309854ced3d65fb07dc1f2c357c0
tree62e7afee6c8d8980a9003dec74ebc7ff750cf91e
parentea54b390aed306d10f79adf6ef4626ebeef901df
aarch64: Fix +nocrypto handling

Additionally, replace all checks for the AARCH64_FL_CRYPTO bit with
checks for (AARCH64_FL_AES | AARCH64_FL_SHA2) instead.  The value of the
AARCH64_FL_CRYPTO bit within isa_flags is now ignored, but it is
retained because removing it would make processing the data in
option-extensions.def significantly more complex.

This bug should have been picked up by an existing test, but a missing
newline meant that the pattern incorrectly allowed "+crypto+nocrypto".

gcc/ChangeLog:

* common/config/aarch64/aarch64-common.cc
(aarch64_get_extension_string_for_isa_flags): Fix generation of
the "+nocrypto" extension.
* config/aarch64/aarch64.h (AARCH64_ISA_CRYPTO): Remove.
(TARGET_CRYPTO): Remove.
* config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins):
Don't use TARGET_CRYPTO.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/options_set_4.c: Add terminating newline.
* gcc.target/aarch64/options_set_27.c: New test.
gcc/common/config/aarch64/aarch64-common.cc
gcc/config/aarch64/aarch64-c.cc
gcc/config/aarch64/aarch64.h
gcc/testsuite/gcc.target/aarch64/options_set_27.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/options_set_4.c
This page took 0.05274 seconds and 5 git commands to generate.