summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qprocessordetection.h4
-rw-r--r--src/corelib/global/qsimd_p.h5
2 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
index f7bca43345..72cc0b4ad4 100644
--- a/src/corelib/global/qprocessordetection.h
+++ b/src/corelib/global/qprocessordetection.h
@@ -340,6 +340,10 @@
# define Q_PROCESSOR_WASM
# define Q_BYTE_ORDER Q_LITTLE_ENDIAN
# define Q_PROCESSOR_WORDSIZE 8
+#ifdef QT_COMPILER_SUPPORTS_SSE2
+# define Q_PROCESSOR_X86 6 // enables SIMD support
+#endif
+
#endif
/*
diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h
index 35979176fa..118a62e6ac 100644
--- a/src/corelib/global/qsimd_p.h
+++ b/src/corelib/global/qsimd_p.h
@@ -190,10 +190,13 @@
# define __SSE__ 1
# endif
-# if defined(Q_CC_GNU) && !defined(Q_CC_INTEL)
+# if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_OS_WASM)
// GCC 4.4 and Clang 2.8 added a few more intrinsics there
# include <x86intrin.h>
# endif
+#ifdef Q_OS_WASM
+# include <immintrin.h>
+# endif
# if defined(__SSE4_2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC))
// POPCNT instructions: