diff options
author | Chris Robinson <[email protected]> | 2018-05-04 04:02:57 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-05-04 04:02:57 -0700 |
commit | 1fb6428ffa2fe7030c3ccdffbe985ff184af0829 (patch) | |
tree | 85638f169aca9570661ae1c52bd5edb65c7f611a | |
parent | b31a54e97217ca0b6737f4f8de82fd50e34f64c9 (diff) |
Another fix attempt for 32-bit MSVC
-rw-r--r-- | OpenAL32/Include/alMain.h | 10 |
1 files changed, 5 insertions, 5 deletions
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__)) |