From 50388a7e4fdc0699dbe2b0666e9f155bdbce6e6e Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 25 Feb 2016 10:05:46 +0100 Subject: iOS: rely on built-in compiler macros to check for CPU features MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iOS cannot do runtime feature detection, and querying the CPU is only allowed in kernel mode (or beyond), so we have to decide the features at compile time, in which case we might as well use the fallback code path that uses the built in __ARM_* macros to point out which features are supported, instead of hard-coding the features for iOS. Change-Id: Ie507c0d8e962a7bdab16508c8b8122645276512e Reviewed-by: Oswald Buddenhagen Reviewed-by: Tor Arne Vestbø --- src/corelib/tools/qsimd.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index 88208d0c9d..5bce42fd5a 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -117,13 +117,7 @@ static inline quint64 detectProcessorFeatures() { quint64 features = 0; -#if defined(Q_OS_IOS) - features |= Q_UINT64_C(1) << CpuFeatureNEON; // On iOS, NEON is always available. -# ifdef Q_PROCESSOR_ARM_V8 - features |= Q_UINT64_C(1) << CpuFeatureCRC32; // On iOS, crc32 is always available if the architecture is Aarch32/64. -# endif - return features; -#elif defined(Q_OS_LINUX) +#if defined(Q_OS_LINUX) # if defined(Q_PROCESSOR_ARM_V8) && defined(Q_PROCESSOR_ARM_64) features |= Q_UINT64_C(1) << CpuFeatureNEON; // NEON is always available on ARMv8 64bit. # endif -- cgit v1.2.3