public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrea Corallo <akrl@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2915] arm: Define __ARM_FEATURE_AES and __ARM_FEATURE_SHA2 when march +crypto is selected Date: Wed, 28 Sep 2022 13:10:43 +0000 (GMT) [thread overview] Message-ID: <20220928131043.3BC523858C83@sourceware.org> (raw) https://gcc.gnu.org/g:5e9c4ed903c39f82f28362d9411d4dbc491264ec commit r13-2915-g5e9c4ed903c39f82f28362d9411d4dbc491264ec Author: Andrea Corallo <andrea.corallo@arm.com> Date: Wed Sep 14 17:38:30 2022 +0200 arm: Define __ARM_FEATURE_AES and __ARM_FEATURE_SHA2 when march +crypto is selected Hi all, this patch fixes the missing definition of __ARM_FEATURE_AES and __ARM_FEATURE_SHA2 when AES SHA1 & SHA2 crypto instructions are available [1] (read when march +crypto is selected). Okay for master? Thanks Andrea [1] <https://raw.githubusercontent.com/ARM-software/acle/main/main/acle.md> gcc/ChangeLog 2022-09-14 Andrea Corallo <andrea.corallo@arm.com> * config/arm/arm-c.cc (arm_cpu_builtins): Define __ARM_FEATURE_AES and __ARM_FEATURE_SHA2. gcc/testsuite/ChangeLog 2022-09-14 Andrea Corallo <andrea.corallo@arm.com> * gcc.target/arm/attr-crypto.c: Update test. Diff: --- gcc/config/arm/arm-c.cc | 2 ++ gcc/testsuite/gcc.target/arm/attr-crypto.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/gcc/config/arm/arm-c.cc b/gcc/config/arm/arm-c.cc index a8697b8c62f..86c56bf2680 100644 --- a/gcc/config/arm/arm-c.cc +++ b/gcc/config/arm/arm-c.cc @@ -202,6 +202,8 @@ arm_cpu_builtins (struct cpp_reader* pfile) def_or_undef_macro (pfile, "__ARM_FEATURE_QBIT", TARGET_ARM_QBIT); def_or_undef_macro (pfile, "__ARM_FEATURE_SAT", TARGET_ARM_SAT); def_or_undef_macro (pfile, "__ARM_FEATURE_CRYPTO", TARGET_CRYPTO); + def_or_undef_macro (pfile, "__ARM_FEATURE_AES", TARGET_CRYPTO); + def_or_undef_macro (pfile, "__ARM_FEATURE_SHA2", TARGET_CRYPTO); def_or_undef_macro (pfile, "__ARM_FEATURE_UNALIGNED", unaligned_access); diff --git a/gcc/testsuite/gcc.target/arm/attr-crypto.c b/gcc/testsuite/gcc.target/arm/attr-crypto.c index cbd13a757d8..05e458f36b6 100644 --- a/gcc/testsuite/gcc.target/arm/attr-crypto.c +++ b/gcc/testsuite/gcc.target/arm/attr-crypto.c @@ -16,6 +16,14 @@ #error __ARM_FEATURE_CRYPTO not defined. #endif +#ifndef __ARM_FEATURE_AES +#error __ARM_FEATURE_AES not defined. +#endif + +#ifndef __ARM_FEATURE_SHA2 +#error __ARM_FEATURE_SHA2 not defined. +#endif + #ifndef __ARM_NEON #error __ARM_NEON not defined. #endif
reply other threads:[~2022-09-28 13:10 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220928131043.3BC523858C83@sourceware.org \ --to=akrl@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).