mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-20 20:46:03 +08:00
Fix x64 compilation in ssemath.h
This commit is contained in:

committed by
Nicholas Hastings

parent
aa3ff6e10f
commit
3ec4c090a0
@ -2931,13 +2931,20 @@ 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)
|
||||||
{
|
{
|
||||||
__m64 bottom = _mm_cvttps_pi32( vSrc );
|
#if defined(_MSC_VER) && _MSC_VER >= 1900 && defined(COMPILER_MSVC64)
|
||||||
__m64 top = _mm_cvttps_pi32( _mm_movehl_ps(vSrc,vSrc) );
|
(*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 top = _mm_cvttps_pi32(_mm_movehl_ps(vSrc, vSrc));
|
||||||
|
|
||||||
*reinterpret_cast<__m64 *>(&(*pDest)[0]) = bottom;
|
*reinterpret_cast<__m64 *>(&(*pDest)[0]) = bottom;
|
||||||
*reinterpret_cast<__m64 *>(&(*pDest)[2]) = top;
|
*reinterpret_cast<__m64 *>(&(*pDest)[2]) = top;
|
||||||
|
|
||||||
_mm_empty();
|
_mm_empty();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user