From 05dc32ef6cc0d7279642839ea21100dee40a81c4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 30 May 2012 14:43:06 +0200 Subject: Fix the confusion caused by the QT_ALWAYS_HAVE_xxx macros The QT_ALWAYS_HAVE_xxx macros are gone: they were hard to use and not defined properly. It indicated that the compiler was producing code that required that particular instruction set, so we could use it in our code unconditionally. Instead, let's use the GCC-style __SSE2__ and __ARM_NEON__. MSVC does not generate the __SSE2__ macro, so let's do it for the compiler. Also, define __AVX__ and the macros for the technologies leading to it when we manage to detect an /arch:AVX build (currently not possible, see note in the header). ICC and MSVC allow one to use the intrinsics anywhere, but for Qt all uses of the intrinsics are either in specially-built files, protected by runtime checks, or they are unconditional (qstring.cpp). So we only use the intrinsics when the compiler was instructed to generate code for that instruction set anyway. Change-Id: If8382f30422cee0e5831d051b003acf036824abf Reviewed-by: Oswald Buddenhagen --- src/corelib/tools/qsimd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools/qsimd.cpp') diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index b07667b4f9..c399a5a527 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -139,7 +139,7 @@ static inline uint detectProcessorFeatures() #if defined(QT_COMPILER_SUPPORTS_IWMMXT) // runtime detection only available when running as a previlegied process features = IWMMXT; -#elif defined(QT_ALWAYS_HAVE_NEON) +#elif defined(__ARM_NEON__) features = NEON; #endif -- cgit v1.2.3