summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-02-25 10:05:46 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-03-04 12:58:52 +0000
commit50388a7e4fdc0699dbe2b0666e9f155bdbce6e6e (patch)
tree855f1cbed64fc47df9bc6a4c7ddf71d9edbbb29d /src/corelib
parent7d2c7ca8fad2d8177599ba3a4851c48d3baf5772 (diff)
iOS: rely on built-in compiler macros to check for CPU features
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 <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qsimd.cpp8
1 files changed, 1 insertions, 7 deletions
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