aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-03-18 20:58:48 -0700
committerChris Robinson <[email protected]>2019-03-18 20:58:48 -0700
commit3e816de4fb3f8be4746643f5b9c5c07186e16b6c (patch)
treeced2f8e0ee5f6f163ac84524c98a113c77e1949f /Alc/effects
parent73a43fb19c2f8eeb724094ec0fb84088513450f7 (diff)
Use SSE intrinsics in a few more places
Diffstat (limited to 'Alc/effects')
-rw-r--r--Alc/effects/pshifter.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/Alc/effects/pshifter.cpp b/Alc/effects/pshifter.cpp
index c76cd6a8..aa7dae87 100644
--- a/Alc/effects/pshifter.cpp
+++ b/Alc/effects/pshifter.cpp
@@ -20,6 +20,10 @@
#include "config.h"
+#ifdef HAVE_SSE_INTRINSICS
+#include <emmintrin.h>
+#endif
+
#include <cmath>
#include <cstdlib>
#include <array>
@@ -48,8 +52,12 @@ using complex_d = std::complex<double>;
inline int double2int(double d)
{
-#if ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__)) && \
- !defined(__SSE2_MATH__)) || (defined(_MSC_VER) && defined(_M_IX86_FP) && _M_IX86_FP < 2)
+#if defined(HAVE_SSE_INTRINSICS)
+ return _mm_cvttsd_si32(_mm_set_sd(d));
+
+#elif ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__)) && \
+ !defined(__SSE2_MATH__)) || (defined(_MSC_VER) && defined(_M_IX86_FP) && _M_IX86_FP < 2)
+
int sign, shift;
int64_t mant;
union {