diff options
author | Jiangning Liu <jiangning.liu@amperecomputing.com> | 2024-03-22 00:52:28 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-04-08 11:54:29 +0200 |
commit | e7f1afe4f7e799394684ce86bd98f2445031eb7f (patch) | |
tree | 31bce6208bc2e86d6a408fa0da73c9293aa0eef3 /crypto/armcap.c | |
parent | NonStop: Do not call sleep() with a 0 value (diff) | |
download | openssl-e7f1afe4f7e799394684ce86bd98f2445031eb7f.tar.xz openssl-e7f1afe4f7e799394684ce86bd98f2445031eb7f.zip |
Enable SHA3 unrolling and EOR3 optimization for Ampere
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23929)
Diffstat (limited to '')
-rw-r--r-- | crypto/armcap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/armcap.c b/crypto/armcap.c index bbb9f454fc..afd3e9083e 100644 --- a/crypto/armcap.c +++ b/crypto/armcap.c @@ -419,11 +419,13 @@ void OPENSSL_cpuid_setup(void) if ((MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_ARM, ARM_CPU_PART_V1) || MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_ARM, ARM_CPU_PART_N2) || MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_MICROSOFT, MICROSOFT_CPU_PART_COBALT_100) || - MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_ARM, ARM_CPU_PART_V2)) && + MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_ARM, ARM_CPU_PART_V2) || + MIDR_IMPLEMENTER(OPENSSL_arm_midr) == ARM_CPU_IMP_AMPERE) && (OPENSSL_armcap_P & ARMV8_SHA3)) OPENSSL_armcap_P |= ARMV8_UNROLL8_EOR3; if ((MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_ARM, ARM_CPU_PART_V1) || - MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_ARM, ARM_CPU_PART_V2)) && + MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_ARM, ARM_CPU_PART_V2) || + MIDR_IMPLEMENTER(OPENSSL_arm_midr) == ARM_CPU_IMP_AMPERE) && (OPENSSL_armcap_P & ARMV8_SHA3)) OPENSSL_armcap_P |= ARMV8_UNROLL12_EOR3; if ((MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM) || |