diff options
author | Chris Robinson <[email protected]> | 2015-10-11 06:38:00 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-10-11 06:38:00 -0700 |
commit | 0211831858fe42b5a95f6992bbdc3d925d589a75 (patch) | |
tree | 7845ccbc2388623fe0a2aeebf0eb91d1fb2613ca /CMakeLists.txt | |
parent | 75d8e5989f737326b216b46e0a5184501fc8315f (diff) |
Move the FIR4 from SSE2 to SSE3
SSE3 can avoid the slow _MM_TRANSPOSE_PS4 call thanks to the inclusion of
horizontal adds.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ea2d5150..af9e961a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -325,6 +325,10 @@ IF(NOT MSVC) IF(HAVE_MSSE2_SWITCH) SET(SSE2_SWITCH "-msse2") ENDIF() + CHECK_C_COMPILER_FLAG(-msse3 HAVE_MSSE3_SWITCH) + IF(HAVE_MSSE3_SWITCH) + SET(SSE3_SWITCH "-msse3") + ENDIF() CHECK_C_COMPILER_FLAG(-msse4.1 HAVE_MSSE4_1_SWITCH) IF(HAVE_MSSE4_1_SWITCH) SET(SSE4_1_SWITCH "-msse4.1") @@ -592,6 +596,7 @@ SET(ALC_OBJS Alc/ALc.c SET(CPU_EXTS "Default") SET(HAVE_SSE 0) SET(HAVE_SSE2 0) +SET(HAVE_SSE3 0) SET(HAVE_SSE4_1 0) SET(HAVE_NEON 0) @@ -652,6 +657,26 @@ IF(ALSOFT_REQUIRE_SSE2 AND NOT HAVE_SSE2) MESSAGE(FATAL_ERROR "Failed to enable required SSE2 CPU extensions") ENDIF() +OPTION(ALSOFT_REQUIRE_SSE2 "Require SSE3 support" OFF) +CHECK_INCLUDE_FILE(pmmintrin.h HAVE_PMMINTRIN_H "${SSE3_SWITCH}") +IF(HAVE_EMMINTRIN_H) + OPTION(ALSOFT_CPUEXT_SSE3 "Enable SSE3 support" ON) + IF(HAVE_SSE2 AND ALSOFT_CPUEXT_SSE3) + IF(ALIGN_DECL OR HAVE_C11_ALIGNAS) + SET(HAVE_SSE3 1) + SET(ALC_OBJS ${ALC_OBJS} Alc/mixer_sse3.c) + IF(SSE2_SWITCH) + SET_SOURCE_FILES_PROPERTIES(Alc/mixer_sse3.c PROPERTIES + COMPILE_FLAGS "${SSE3_SWITCH}") + ENDIF() + SET(CPU_EXTS "${CPU_EXTS}, SSE3") + ENDIF() + ENDIF() +ENDIF() +IF(ALSOFT_REQUIRE_SSE3 AND NOT HAVE_SSE3) + MESSAGE(FATAL_ERROR "Failed to enable required SSE3 CPU extensions") +ENDIF() + OPTION(ALSOFT_REQUIRE_SSE4_1 "Require SSE4.1 support" OFF) CHECK_INCLUDE_FILE(smmintrin.h HAVE_SMMINTRIN_H "${SSE4_1_SWITCH}") IF(HAVE_SMMINTRIN_H) |