Extend the lrint MSVC hack to support x64 as well
See http://sourceforge.net/p/freeimage/discussion/36111/thread/b43c17c5

svn path=/trunk/; revision=60142
This commit is contained in:
Timo Kreuzer 2013-09-15 17:31:25 +00:00
parent d12cda0252
commit 6ecfff267a

View file

@ -64,17 +64,26 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound);
#endif
/* This is an inlined version of lrintf. */
#if defined(_M_IX86) && defined(_MSC_VER)
#if defined(_MSC_VER)
#if defined(_M_AMD64)
#include <xmmintrin.h>
#endif
FORCEINLINE
int
lrintf(float f)
{
#if defined(_M_IX86)
int result;
__asm
{
fld f;
fistp result;
}
return result;
#elif defined(_M_AMD64)
return _mm_cvtss_si32(_mm_load_ss(&f));
#endif
}
#endif