From 727de658166b325632e493b4ac6bfb5de690863e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 29 Sep 2022 09:52:37 -0700 Subject: [PATCH] qsimd: remove the F16C macro in the Haswell sub-arch testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit F16C is an Ivy Bridge (third generation Intel Core), not Haswell (fourth generation). This allows compiling with -march=native on Ivy Bridge and equivalent systems. Fixes: QTBUG-107072 Change-Id: I810d70e579eb4e2c8e45fffd171962f8a8d2bbb1 Reviewed-by: Tor Arne Vestbø Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit a98cf15ed1b57aee695de01b04a974637b2cd44a) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qsimd_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h index 1feedbbb238..fac49d142a9 100644 --- a/src/corelib/global/qsimd_p.h +++ b/src/corelib/global/qsimd_p.h @@ -211,9 +211,9 @@ asm( // // macOS's fat binaries support the "x86_64h" sub-architecture and the GNU libc // ELF loader also supports a "haswell/" subdir (e.g., /usr/lib/haswell). -# define ARCH_HASWELL_MACROS (__AVX2__ + __BMI__ + __BMI2__ + __F16C__ + __FMA__ + __LZCNT__) +# define ARCH_HASWELL_MACROS (__AVX2__ + __BMI__ + __BMI2__ + __FMA__ + __LZCNT__) # if ARCH_HASWELL_MACROS != 0 -# if ARCH_HASWELL_MACROS != 6 +# if ARCH_HASWELL_MACROS != 5 # error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2" # endif static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which features are missing.");