summaryrefslogtreecommitdiff
path: root/extra/openal/openal-i686.patch
blob: 4a42844d72567bfa3dedf5cbd18c05fbed8cb2bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0cf0613d..53b325db 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -369,20 +369,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()
@@ -758,9 +763,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 23caf797..c0fd8fa1 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 {