From 1fb6428ffa2fe7030c3ccdffbe985ff184af0829 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 4 May 2018 04:02:57 -0700 Subject: Another fix attempt for 32-bit MSVC --- OpenAL32/Include/alMain.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenAL32/Include/alMain.h') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index fa29069f..e29d9c27 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -233,14 +233,14 @@ inline size_t RoundUp(size_t value, size_t r) */ inline ALint fastf2i(ALfloat f) { -#if defined(_MSC_VER) && defined(_M_IX86_FP) +#if defined(HAVE_INTRIN_H) && ((defined(_M_IX86_FP) && (_M_IX86_FP > 0)) || defined(_M_X64)) + return _mm_cvt_ss2si(_mm_set1_ps(f)); + +#elif defined(_MSC_VER) && defined(_M_IX86_FP) + ALint i; -#if _M_IX86_FP > 0 - __asm { cvtss2si i, f } -#else __asm fld f __asm fistp i -#endif return i; #elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__)) -- cgit v1.2.3