From 986230eef9720ad720e352baeec7f70f7c848903 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 24 Jun 2014 17:51:28 -0700 Subject: [PATCH] Add a few missing Neon constructs The #undef in qcompilerdetection.h was missing. And apparently we can detect Neon since Windows Mobile 6 too. Change-Id: I38a5f71b2704a29a706183e39f43db3a78a729db Reviewed-by: Oswald Buddenhagen Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/corelib/global/qcompilerdetection.h | 1 + src/corelib/tools/qsimd.cpp | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 693d7e5c75b..02365449e5a 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -1070,6 +1070,7 @@ #endif #if !defined(Q_PROCESSOR_ARM) # undef QT_COMPILER_SUPPORTS_IWMMXT +# undef QT_COMPILER_SUPPORTS_NEON #endif #if !defined(Q_PROCESSOR_MIPS) # undef QT_COMPILER_SUPPORTS_MIPS_DSP diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index a99c460b06c..64f13cf1e7c 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -86,19 +86,18 @@ static inline uint detectProcessorFeatures() uint features = 0; #if defined (ARM) - if (IsProcessorFeaturePresent(PF_ARM_INTEL_WMMX)) { - features = IWMMXT; - return features; - } + if (IsProcessorFeaturePresent(PF_ARM_INTEL_WMMX)) + features |= IWMMXT; +# ifdef PF_ARM_NEON + if (IsProcessorFeaturePresent(PF_ARM_NEON)) + features |= ARM_NEON; +# endif #elif defined(_X86_) - features = 0; if (IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE)) features |= SSE2; if (IsProcessorFeaturePresent(PF_SSE3_INSTRUCTIONS_AVAILABLE)) features |= SSE3; - return features; #endif - features = 0; return features; }