Skip to content

Commit

Permalink
Remove the mandatory x86-64 features from its feature list
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thiagomacieira committed May 31, 2023
1 parent 2e1318f commit 77e89dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config.tests/arch/arch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 77e89dc

Please sign in to comment.