summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-06-24 17:51:28 -0700
committerThiago Macieira <thiago.macieira@intel.com>2014-08-05 19:22:52 +0200
commit986230eef9720ad720e352baeec7f70f7c848903 (patch)
tree5949bdf5c1797723b9653467dba7c8746dbd0da0 /src/corelib
parentcd3331802516c012aed1be329e2e889478cbdd3e (diff)
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 <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qcompilerdetection.h1
-rw-r--r--src/corelib/tools/qsimd.cpp13
2 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 693d7e5c75..02365449e5 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 a99c460b06..64f13cf1e7 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;
}