1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 12:36:05 +08:00

Fix x64 compilation in ssemath.h

This commit is contained in:
GAMMACASE
2023-05-18 07:47:27 +03:00
committed by Nicholas Hastings
parent aa3ff6e10f
commit 3ec4c090a0

View File

@ -2931,6 +2931,12 @@ FORCEINLINE i32x4 IntShiftLeftWordSIMD(const i32x4 &vSrcA, const i32x4 &vSrcB)
// like this. // like this.
FORCEINLINE void ConvertStoreAsIntsSIMD(intx4 * RESTRICT pDest, const fltx4 &vSrc) FORCEINLINE void ConvertStoreAsIntsSIMD(intx4 * RESTRICT pDest, const fltx4 &vSrc)
{ {
#if defined(_MSC_VER) && _MSC_VER >= 1900 && defined(COMPILER_MSVC64)
(*pDest)[0] = (int)SubFloat(vSrc, 0);
(*pDest)[1] = (int)SubFloat(vSrc, 1);
(*pDest)[2] = (int)SubFloat(vSrc, 2);
(*pDest)[3] = (int)SubFloat(vSrc, 3);
#else
__m64 bottom = _mm_cvttps_pi32(vSrc); __m64 bottom = _mm_cvttps_pi32(vSrc);
__m64 top = _mm_cvttps_pi32(_mm_movehl_ps(vSrc, vSrc)); __m64 top = _mm_cvttps_pi32(_mm_movehl_ps(vSrc, vSrc));
@ -2938,6 +2944,7 @@ FORCEINLINE void ConvertStoreAsIntsSIMD(intx4 * RESTRICT pDest, const fltx4 &vSr
*reinterpret_cast<__m64 *>(&(*pDest)[2]) = top; *reinterpret_cast<__m64 *>(&(*pDest)[2]) = top;
_mm_empty(); _mm_empty();
#endif
} }