mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-21 04:56:01 +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.
|
||||
FORCEINLINE void ConvertStoreAsIntsSIMD(intx4 * RESTRICT pDest, const fltx4 &vSrc)
|
||||
{
|
||||
__m64 bottom = _mm_cvttps_pi32( vSrc );
|
||||
__m64 top = _mm_cvttps_pi32( _mm_movehl_ps(vSrc,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 top = _mm_cvttps_pi32(_mm_movehl_ps(vSrc, vSrc));
|
||||
|
||||
*reinterpret_cast<__m64 *>(&(*pDest)[0]) = bottom;
|
||||
*reinterpret_cast<__m64 *>(&(*pDest)[2]) = top;
|
||||
|
||||
_mm_empty();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user