From 77e89dcce4a4f43129fc3a6a654733a9f74dee1d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 24 Nov 2022 09:12:28 -0800 Subject: [PATCH] Remove the mandatory x86-64 features from its feature list The x86-64 architecture mandates support for MMX and SSE2, so we don't need to tell that the compiler generates them. They're implied. This could serve to determine that the user specified no -march= or -m flags that affect the architecture on the CMAKE_CXX_FLAGS, but fails if the compiler does that on its own for this particular target. For example, both for Android and macOS, the minimum feature set is SSSE3 for 32-bit and SSE4.1 for 64-bit. Change-Id: I76216ced393445a4ae2dfffd172a94b17e8a9a37 Reviewed-by: Allan Sandfeld Jensen --- config.tests/arch/arch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.tests/arch/arch.cpp b/config.tests/arch/arch.cpp index dfef878426a..ffb6c787ff5 100644 --- a/config.tests/arch/arch.cpp +++ b/config.tests/arch/arch.cpp @@ -141,7 +141,7 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:" // Leading-Zero bit count, Intel Core 4th Generation ("Haswell") " lzcnt" #endif -#ifdef __MMX__ +#if defined(__MMX__) && defined(__i386__) // Multimedia Extensions, Pentium MMX, AMD K6-2 " mmx" #endif @@ -198,11 +198,11 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:" // Shadow stack, Intel processor TBA " shstk" #endif -#if defined(__SSE__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1) || defined(_M_X64) +#if (defined(__SSE__) && defined(__i386__)) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1 && defined(_M_IX86)) // Streaming SIMD Extensions, Intel Pentium III, AMD Athlon " sse" #endif -#if defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) || defined(_M_X64) +#if (defined(__SSE2__) && defined(__i386__)) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2 && defined(_M_IX86)) // SSE2, Intel Pentium-M, Intel Pentium 4, AMD Opteron and Athlon 64 " sse2" #endif