build: arm target support

This commit is contained in:
nillerusr
2021-04-25 23:36:09 +03:00
parent e794dbcbb1
commit 50a93ce91a
51 changed files with 8210 additions and 4386 deletions
+6 -7
View File
@@ -458,11 +458,7 @@ void inline SinCos( float radians, float *sine, float *cosine )
*sine = sin( radians );
*cosine = cos( radians );
#elif defined( POSIX )
double __cosr, __sinr;
__asm ("fsincos" : "=t" (__cosr), "=u" (__sinr) : "0" (radians));
*sine = __sinr;
*cosine = __cosr;
sincosf(radians, sine, cosine);
#endif
}
@@ -1217,6 +1213,8 @@ FORCEINLINE int RoundFloatToInt(float f)
};
flResult = __fctiw( f );
return pResult[1];
#elif defined (__arm__)
return (int)(f + 0.5f);
#else
#error Unknown architecture
#endif
@@ -1247,8 +1245,9 @@ FORCEINLINE unsigned long RoundFloatToUnsignedLong(float f)
Assert( pIntResult[1] >= 0 );
return pResult[1];
#else // !X360
#if defined( PLATFORM_WINDOWS_PC64 )
#ifdef __arm__
return (unsigned long)(f + 0.5f);
#elif defined( PLATFORM_WINDOWS_PC64 )
uint nRet = ( uint ) f;
if ( nRet & 1 )
{