public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/115618] New: GCC 13.3 should defined __ARM_FEATURE_CRYPTO with +aes+sha2
@ 2024-06-24 16:11 ktkachov at gcc dot gnu.org
2024-06-24 16:14 ` [Bug target/115618] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2024-06-24 16:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115618
Bug ID: 115618
Summary: GCC 13.3 should defined __ARM_FEATURE_CRYPTO with
+aes+sha2
Product: gcc
Version: 13.3.1
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: ktkachov at gcc dot gnu.org
CC: tnfchris at gcc dot gnu.org
Target Milestone: ---
Target: aarch64
I think this has been fixed in GCC 14 onwards but we're seeing
__ARM_FEATURE_CRYPTO missing from some -mcpu=native cases that should be
including it (the prerequisite "aes pmull sha1 sha2" info exists in cpuinfo)
with GCC 13-based compilers.
I think this can be reproduced with:
#ifndef __ARM_FEATURE_CRYPTO
#error "__ARM_FEATURE_CRYPTO should be defined!"
#endif
void
foo (void)
{
}
compiled with GCC 13.3 with -march=armv9-a+aes+sha2 gives an error but it works
with GCC 14.1. I remember there was much rework in this area, could something
be backported to the branch?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/115618] GCC 13.3 should defined __ARM_FEATURE_CRYPTO with +aes+sha2
2024-06-24 16:11 [Bug target/115618] New: GCC 13.3 should defined __ARM_FEATURE_CRYPTO with +aes+sha2 ktkachov at gcc dot gnu.org
@ 2024-06-24 16:14 ` pinskia at gcc dot gnu.org
2024-06-24 16:15 ` [Bug target/115618] [11/12/13 only] " pinskia at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-24 16:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115618
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
r14-6612-g8d30107455f230
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/115618] [11/12/13 only] should defined __ARM_FEATURE_CRYPTO with +aes+sha2
2024-06-24 16:11 [Bug target/115618] New: GCC 13.3 should defined __ARM_FEATURE_CRYPTO with +aes+sha2 ktkachov at gcc dot gnu.org
2024-06-24 16:14 ` [Bug target/115618] " pinskia at gcc dot gnu.org
@ 2024-06-24 16:15 ` pinskia at gcc dot gnu.org
2024-06-25 8:10 ` ktkachov at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-24 16:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115618
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|GCC 13.3 should defined |[11/12/13 only] should
|__ARM_FEATURE_CRYPTO with |defined
|+aes+sha2 |__ARM_FEATURE_CRYPTO with
| |+aes+sha2
Target Milestone|--- |13.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/115618] [11/12/13 only] should defined __ARM_FEATURE_CRYPTO with +aes+sha2
2024-06-24 16:11 [Bug target/115618] New: GCC 13.3 should defined __ARM_FEATURE_CRYPTO with +aes+sha2 ktkachov at gcc dot gnu.org
2024-06-24 16:14 ` [Bug target/115618] " pinskia at gcc dot gnu.org
2024-06-24 16:15 ` [Bug target/115618] [11/12/13 only] " pinskia at gcc dot gnu.org
@ 2024-06-25 8:10 ` ktkachov at gcc dot gnu.org
2024-06-25 13:23 ` ktkachov at gcc dot gnu.org
2024-06-27 13:07 ` [Bug target/115618] [11/12/13 only] should define " cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2024-06-25 8:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115618
--- Comment #2 from ktkachov at gcc dot gnu.org ---
(In reply to Andrew Pinski from comment #1)
> r14-6612-g8d30107455f230
Yeah I had suspected that commit. It does indeed fix this and applies cleanly
to GCC 13. I'll run more testing.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/115618] [11/12/13 only] should defined __ARM_FEATURE_CRYPTO with +aes+sha2
2024-06-24 16:11 [Bug target/115618] New: GCC 13.3 should defined __ARM_FEATURE_CRYPTO with +aes+sha2 ktkachov at gcc dot gnu.org
` (2 preceding siblings ...)
2024-06-25 8:10 ` ktkachov at gcc dot gnu.org
@ 2024-06-25 13:23 ` ktkachov at gcc dot gnu.org
2024-06-27 13:07 ` [Bug target/115618] [11/12/13 only] should define " cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2024-06-25 13:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115618
--- Comment #3 from ktkachov at gcc dot gnu.org ---
Testing showed no regressions and the issue in this PR is fixed by the
backport. I think we should backport this patch
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/115618] [11/12/13 only] should define __ARM_FEATURE_CRYPTO with +aes+sha2
2024-06-24 16:11 [Bug target/115618] New: GCC 13.3 should defined __ARM_FEATURE_CRYPTO with +aes+sha2 ktkachov at gcc dot gnu.org
` (3 preceding siblings ...)
2024-06-25 13:23 ` ktkachov at gcc dot gnu.org
@ 2024-06-27 13:07 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-27 13:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115618
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Kyrylo Tkachov
<ktkachov@gcc.gnu.org>:
https://gcc.gnu.org/g:c93a9bba743ac236f6045ba7aafbc12a83726c48
commit r13-8873-gc93a9bba743ac236f6045ba7aafbc12a83726c48
Author: Andrew Carlotti <andrew.carlotti@arm.com>
Date: Fri Nov 24 17:06:07 2023 +0000
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:
PR target/115618
* 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:
PR target/115618
* gcc.target/aarch64/options_set_4.c: Add terminating newline.
* gcc.target/aarch64/options_set_27.c: New test.
(cherry picked from commit 8d30107455f2309854ced3d65fb07dc1f2c357c0)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-06-27 13:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-24 16:11 [Bug target/115618] New: GCC 13.3 should defined __ARM_FEATURE_CRYPTO with +aes+sha2 ktkachov at gcc dot gnu.org
2024-06-24 16:14 ` [Bug target/115618] " pinskia at gcc dot gnu.org
2024-06-24 16:15 ` [Bug target/115618] [11/12/13 only] " pinskia at gcc dot gnu.org
2024-06-25 8:10 ` ktkachov at gcc dot gnu.org
2024-06-25 13:23 ` ktkachov at gcc dot gnu.org
2024-06-27 13:07 ` [Bug target/115618] [11/12/13 only] should define " cvs-commit at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).