From 970b249140da895abc23c3499ec11ccbf060fe00 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 15 Dec 2021 19:44:58 -0300 Subject: qsimd.h: move the rest of the __xxx__ definitions that MSVC lacks The Intel compiler is now based on Clang, so it always defines the macros like Clang and GCC do, so we don't need to worry about it any more. We only need to define the macros that MSVC lacks. Change-Id: Ib42b3adc93bf4d43bd55fffd16c10f0f6fef43ef Reviewed-by: Lars Knoll Reviewed-by: Allan Sandfeld Jensen --- src/corelib/global/qsimd_p.h | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) (limited to 'src/corelib/global/qsimd_p.h') diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h index 118a62e6ac..fdf5529135 100644 --- a/src/corelib/global/qsimd_p.h +++ b/src/corelib/global/qsimd_p.h @@ -198,33 +198,8 @@ # include # endif -# if defined(__SSE4_2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC)) -// POPCNT instructions: -// All processors that support SSE4.2 support POPCNT -// (but neither MSVC nor the Intel compiler define this macro) -# define __POPCNT__ 1 -# endif - -// AVX intrinsics -# if defined(__AVX__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC)) -// PCLMULQDQ instructions: -// All processors that support AVX support PCLMULQDQ -// (but neither MSVC nor the Intel compiler define this macro) -# define __PCLMUL__ 1 -# endif - -# if defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC)) -// F16C instructions: -// All processors that support AVX2 support F16C: -// (but neither MSVC nor the Intel compiler define this macro) -# define __F16C__ 1 -# endif - -# if defined(__BMI__) && !defined(__BMI2__) && defined(Q_CC_INTEL) -// BMI2 instructions: -// All processors that support BMI support BMI2 (and AVX2) -// (but neither MSVC nor the Intel compiler define this macro) -# define __BMI2__ 1 +# if defined(Q_CC_GNU) && defined(__AVX2__) && (!defined(__BMI__) || !defined(__FMA__)) +# error "Please enable the BMI and FMA extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2" # endif # include "qsimd_x86_p.h" -- cgit v1.2.3