From cda53f290fbe57403a9db473aed61ad13193a4ec Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 24 Sep 2024 16:36:30 +0200 Subject: [PATCH] Fix runtime detection of ARM AES extension on Darwin (iOS) Is enabled unconditionally for all desktop processors already. Pick-to: 6.8 Change-Id: Iaf8508fabcf90b6e76692d07250679a1a6103dca Reviewed-by: Thiago Macieira --- src/corelib/global/qsimd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qsimd.cpp b/src/corelib/global/qsimd.cpp index 1d3214b273e..5e0e8380d49 100644 --- a/src/corelib/global/qsimd.cpp +++ b/src/corelib/global/qsimd.cpp @@ -138,7 +138,8 @@ static inline quint64 detectProcessorFeatures() features |= feature ? CpuFeatureNEON : 0; if (sysctlbyname("hw.optional.armv8_crc32", &feature, &len, nullptr, 0) == 0) features |= feature ? CpuFeatureCRC32 : 0; - // There is currently no optional value for crypto/AES. + if (sysctlbyname("hw.optional.arm.FEAT_AES", &feature, &len, nullptr, 0) == 0) + features |= feature ? CpuFeatureAES : 0; #if defined(__ARM_FEATURE_CRYPTO) features |= CpuFeatureAES; #endif