mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[DSOUND]
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:
parent
d12cda0252
commit
6ecfff267a
1 changed files with 10 additions and 1 deletions
|
@ -64,17 +64,26 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This is an inlined version of lrintf. */
|
/* 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
|
FORCEINLINE
|
||||||
int
|
int
|
||||||
lrintf(float f)
|
lrintf(float f)
|
||||||
{
|
{
|
||||||
|
#if defined(_M_IX86)
|
||||||
int result;
|
int result;
|
||||||
__asm
|
__asm
|
||||||
{
|
{
|
||||||
fld f;
|
fld f;
|
||||||
fistp result;
|
fistp result;
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
|
#elif defined(_M_AMD64)
|
||||||
|
return _mm_cvtss_si32(_mm_load_ss(&f));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue