From 3bea9450e90a6c8db1554faa5b467186e63b31a0 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 31 Oct 2016 16:07:53 -0700 Subject: Update the Clang support for SIMD code generation Clang 3.8 has support for __attribute__((target(xxx))) and its SIMD headers can be included unconditionally. Change-Id: Ic15b7ff417c8412893e5fffd14b5b42b950b48d7 Reviewed-by: Allan Sandfeld Jensen --- src/corelib/tools/qsimd_p.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/corelib/tools/qsimd_p.h') diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index d5d887598e..28253b3ae9 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -166,10 +166,11 @@ # define __MIPS_DSPR2__ # endif #elif (defined(Q_CC_INTEL) || defined(Q_CC_MSVC) \ - || (defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && (__GNUC__-0) * 100 + (__GNUC_MINOR__-0) >= 409)) \ + || (defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && Q_CC_GNU >= 409) \ + || (defined(Q_CC_CLANG) && Q_CC_CLANG >= 308)) \ && !defined(QT_BOOTSTRAPPED) # define QT_COMPILER_SUPPORTS_SIMD_ALWAYS -# define QT_COMPILER_SUPPORTS_HERE(x) (__ ## x ## __) || QT_COMPILER_SUPPORTS(x) +# define QT_COMPILER_SUPPORTS_HERE(x) ((__ ## x ## __) || QT_COMPILER_SUPPORTS(x)) # if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) /* GCC requires attributes for a function */ # define QT_FUNCTION_TARGET(x) __attribute__((__target__(QT_FUNCTION_TARGET_STRING_ ## x))) -- cgit v1.2.3