Merge pull request #599 from cxd4/annoying_COP1_asm_stuff

COP1 FP 32-bit round to integer doable with intrinsics?
This commit is contained in:
zilmar 2015-09-15 13:19:34 +10:00
commit 624b388a1a
1 changed files with 8 additions and 2 deletions

View File

@ -2364,7 +2364,10 @@ __inline void Float_RoundToInteger32( int * Dest, float * Source )
fistp dword ptr [edi] fistp dword ptr [edi]
} }
#else #else
g_Notify->BreakPoint(__FILEW__,__LINE__); __m128 xmm;
xmm = _mm_load_ss(Source);
*(Dest) = _mm_cvt_ss2si(xmm);
#endif #endif
} }
@ -2379,7 +2382,10 @@ __inline void Float_RoundToInteger64( __int64 * Dest, float * Source )
fistp qword ptr [edi] fistp qword ptr [edi]
} }
#else #else
g_Notify->BreakPoint(__FILEW__,__LINE__); __m128 xmm;
xmm = _mm_load_ss(Source);
*(Dest) = _mm_cvtss_si64(xmm);
#endif #endif
} }