diff options
-rw-r--r-- | CMakeLists.txt | 25 | ||||
-rw-r--r-- | core/mixer/mixer_sse.cpp | 5 |
2 files changed, 19 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 007c2cdf..ce6be681 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -370,20 +370,25 @@ set(HAVE_SSE3 0) set(HAVE_SSE4_1 0) set(HAVE_NEON 0) -# Check for SSE+SSE2 support +# Check for SSE support option(ALSOFT_REQUIRE_SSE "Require SSE support" OFF) -option(ALSOFT_REQUIRE_SSE2 "Require SSE2 support" OFF) -if(HAVE_XMMINTRIN_H AND HAVE_EMMINTRIN_H) +if(HAVE_XMMINTRIN_H) option(ALSOFT_CPUEXT_SSE "Enable SSE support" ON) - option(ALSOFT_CPUEXT_SSE2 "Enable SSE2 support" ON) - if(ALSOFT_CPUEXT_SSE AND ALSOFT_CPUEXT_SSE2) + if(ALSOFT_CPUEXT_SSE) set(HAVE_SSE 1) - set(HAVE_SSE2 1) endif() endif() if(ALSOFT_REQUIRE_SSE AND NOT HAVE_SSE) message(FATAL_ERROR "Failed to enabled required SSE CPU extensions") endif() + +option(ALSOFT_REQUIRE_SSE2 "Require SSE2 support" OFF) +if(HAVE_EMMINTRIN_H) + option(ALSOFT_CPUEXT_SSE2 "Enable SSE2 support" ON) + if(HAVE_SSE AND ALSOFT_CPUEXT_SSE2) + set(HAVE_SSE2 1) + endif() +endif() if(ALSOFT_REQUIRE_SSE2 AND NOT HAVE_SSE2) message(FATAL_ERROR "Failed to enable required SSE2 CPU extensions") endif() @@ -794,9 +799,13 @@ set(ALC_OBJS # Include SIMD mixers set(CPU_EXTS "Default") +if(HAVE_SSE) + set(CORE_OBJS ${CORE_OBJS} core/mixer/mixer_sse.cpp) + set(CPU_EXTS "${CPU_EXTS}, SSE") +endif() if(HAVE_SSE2) - set(CORE_OBJS ${CORE_OBJS} core/mixer/mixer_sse.cpp core/mixer/mixer_sse2.cpp) - set(CPU_EXTS "${CPU_EXTS}, SSE, SSE2") + set(CORE_OBJS ${CORE_OBJS} core/mixer/mixer_sse2.cpp) + set(CPU_EXTS "${CPU_EXTS}, SSE2") endif() if(HAVE_SSE3) set(CORE_OBJS ${CORE_OBJS} core/mixer/mixer_sse3.cpp) diff --git a/core/mixer/mixer_sse.cpp b/core/mixer/mixer_sse.cpp index 2a11601c..3cfb00a5 100644 --- a/core/mixer/mixer_sse.cpp +++ b/core/mixer/mixer_sse.cpp @@ -15,9 +15,8 @@ struct BSincTag; struct FastBSincTag; -/* SSE2 is required for any SSE support. */ -#if defined(__GNUC__) && !defined(__clang__) && !defined(__SSE2__) -#pragma GCC target("sse2") +#if defined(__GNUC__) && !defined(__clang__) && !defined(__SSE__) +#pragma GCC target("sse") #endif namespace { |