mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
arm64 detect marcos
This commit is contained in:
@@ -457,6 +457,8 @@ void inline SinCos( float radians, float *sine, float *cosine )
|
||||
#elif defined( PLATFORM_WINDOWS_PC64 )
|
||||
*sine = sin( radians );
|
||||
*cosine = cos( radians );
|
||||
#elif defined( OSX )
|
||||
__sincosf(radians, sine, cosine);
|
||||
#elif defined( POSIX )
|
||||
sincosf(radians, sine, cosine);
|
||||
#endif
|
||||
@@ -1213,7 +1215,7 @@ FORCEINLINE int RoundFloatToInt(float f)
|
||||
};
|
||||
flResult = __fctiw( f );
|
||||
return pResult[1];
|
||||
#elif defined (__arm__)
|
||||
#elif defined (__arm__) || defined (__arm64__)
|
||||
return (int)(f + 0.5f);
|
||||
#else
|
||||
#error Unknown architecture
|
||||
@@ -1245,7 +1247,7 @@ FORCEINLINE unsigned long RoundFloatToUnsignedLong(float f)
|
||||
Assert( pIntResult[1] >= 0 );
|
||||
return pResult[1];
|
||||
#else // !X360
|
||||
#ifdef __arm__
|
||||
#if defined(__arm__) || defined(__arm64__)
|
||||
return (unsigned long)(f + 0.5f);
|
||||
#elif defined( PLATFORM_WINDOWS_PC64 )
|
||||
uint nRet = ( uint ) f;
|
||||
@@ -2168,7 +2170,7 @@ inline bool CloseEnough( const Vector &a, const Vector &b, float epsilon = EQUAL
|
||||
// Fast compare
|
||||
// maxUlps is the maximum error in terms of Units in the Last Place. This
|
||||
// specifies how big an error we are willing to accept in terms of the value
|
||||
// of the least significant digit of the floating point number’s
|
||||
// of the least significant digit of the floating point number�s
|
||||
// representation. maxUlps can also be interpreted in terms of how many
|
||||
// representable floats we are willing to accept between A and B.
|
||||
// This function will allow maxUlps-1 floats between A and B.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#if defined( _X360 )
|
||||
#include <xboxmath.h>
|
||||
#elif defined(__arm__)
|
||||
#elif defined(__arm__) || defined(__arm64__)
|
||||
#include "sse2neon.h"
|
||||
#else
|
||||
#include <xmmintrin.h>
|
||||
|
||||
@@ -654,10 +654,10 @@ inline void Vector4DWeightMAD( vec_t w, Vector4DAligned const& vInA, Vector4DAli
|
||||
vOutB.z += vInB.z * w;
|
||||
vOutB.w += vInB.w * w;
|
||||
#else
|
||||
__vector4 temp;
|
||||
__vector4 temp;
|
||||
|
||||
temp = __lvlx( &w, 0 );
|
||||
temp = __vspltw( temp, 0 );
|
||||
temp = __lvlx( &w, 0 );
|
||||
temp = __vspltw( temp, 0 );
|
||||
|
||||
vOutA.AsM128() = __vmaddfp( vInA.AsM128(), temp, vOutA.AsM128() );
|
||||
vOutB.AsM128() = __vmaddfp( vInB.AsM128(), temp, vOutB.AsM128() );
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//========= Copyright © 1996-2008, Valve LLC, All rights reserved. ============
|
||||
//========= Copyright � 1996-2008, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
@@ -24,7 +24,7 @@ typedef unsigned char uint8;
|
||||
#define POSIX 1
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(_WIN64)
|
||||
#if defined(__x86_64__) || defined(_WIN64) || defined(__arm64__)
|
||||
#define X64BITS
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
// Temporarily turn off Valve defines
|
||||
#include "tier0/valve_off.h"
|
||||
|
||||
#if !defined(_WCHAR_T_DEFINED) && !defined(GNUC)
|
||||
#if !defined(_WCHAR_T_DEFINED) && !defined( __WCHAR_TYPE__ ) && !defined(GNUC)
|
||||
typedef unsigned short wchar_t;
|
||||
#define _WCHAR_T_DEFINED
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user