]> git.pld-linux.org Git - packages/OpenAL.git/blobdiff - OpenAL-nosse.patch
- ALSOFT_CPUEXT_* are safe (runtime detected); but ALSOFT_ENABLE_SSE2_CODEGEN makes...
[packages/OpenAL.git] / OpenAL-nosse.patch
diff --git a/OpenAL-nosse.patch b/OpenAL-nosse.patch
new file mode 100644 (file)
index 0000000..cf2a9d6
--- /dev/null
@@ -0,0 +1,49 @@
+--- openal-soft-1.20.0/common/alnumeric.h.orig 2019-11-28 09:45:08.000000000 +0100
++++ openal-soft-1.20.0/common/alnumeric.h      2019-12-04 05:28:38.843039338 +0100
+@@ -191,7 +191,7 @@
+  */
+ inline int fastf2i(float f) noexcept
+ {
+-#if defined(HAVE_SSE_INTRINSICS)
++#if defined(HAVE_SSE_INTRINSICS) && defined(__SSE_MATH__)
+     return _mm_cvt_ss2si(_mm_set_ss(f));
+ #elif defined(_MSC_VER) && defined(_M_IX86_FP)
+@@ -222,7 +222,7 @@
+ /** Converts float-to-int using standard behavior (truncation). */
+ inline int float2int(float f) noexcept
+ {
+-#if defined(HAVE_SSE_INTRINSICS)
++#if defined(HAVE_SSE_INTRINSICS) && defined(__SSE_MATH__)
+     return _mm_cvtt_ss2si(_mm_set_ss(f));
+ #elif ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__)) && \
+@@ -257,7 +257,7 @@
+ /** Converts double-to-int using standard behavior (truncation). */
+ inline int double2int(double d) noexcept
+ {
+-#if defined(HAVE_SSE_INTRINSICS)
++#if defined(HAVE_SSE_INTRINSICS) && defined(__SSE_MATH__)
+     return _mm_cvttsd_si32(_mm_set_sd(d));
+ #elif ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__)) && \
+--- openal-soft-1.20.0/alc/helpers.cpp.orig    2019-11-28 09:45:08.000000000 +0100
++++ openal-soft-1.20.0/alc/helpers.cpp 2019-12-04 18:37:09.810067181 +0100
+@@ -209,7 +209,7 @@
+ FPUCtl::FPUCtl()
+ {
+-#if defined(HAVE_SSE_INTRINSICS)
++#if defined(HAVE_SSE_INTRINSICS) && defined(__SSE_MATH__)
+     this->sse_state = _mm_getcsr();
+     unsigned int sseState = this->sse_state;
+     sseState |= 0x8000; /* set flush-to-zero */
+@@ -236,7 +236,7 @@
+ {
+     if(!this->in_mode) return;
+-#if defined(HAVE_SSE_INTRINSICS)
++#if defined(HAVE_SSE_INTRINSICS) && defined(__SSE_MATH__)
+     _mm_setcsr(this->sse_state);
+ #elif defined(__GNUC__) && defined(HAVE_SSE)
This page took 0.04288 seconds and 4 git commands to generate.