mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
build: arm target support
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
#include <string>
|
||||
#include <time.h>
|
||||
|
||||
|
||||
// Enable to do pathmatch caching. Beware: this code isn't threadsafe.
|
||||
// #define DO_PATHMATCH_CACHE
|
||||
|
||||
@@ -66,7 +67,16 @@
|
||||
|
||||
static bool s_bShowDiag;
|
||||
#define DEBUG_MSG( ... ) if ( s_bShowDiag ) fprintf( stderr, ##__VA_ARGS__ )
|
||||
|
||||
#ifdef POSIX
|
||||
#include <signal.h>
|
||||
#define DEBUG_BREAK() raise(SIGINT)
|
||||
#elif !defined (__arm__)
|
||||
#define DEBUG_BREAK() __asm__ __volatile__ ( "int $3" )
|
||||
#else
|
||||
#define DEBUG_BREAK()
|
||||
#endif
|
||||
|
||||
#define _COMPILE_TIME_ASSERT(pred) switch(0){case 0:case pred:;}
|
||||
|
||||
#define WRAP( fn, ret, ... ) \
|
||||
|
||||
@@ -6,6 +6,14 @@
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
|
||||
#if defined (__arm__)
|
||||
bool CheckMMXTechnology(void) { return false; }
|
||||
bool CheckSSETechnology(void) { return false; }
|
||||
bool CheckSSE2Technology(void) { return false; }
|
||||
bool Check3DNowTechnology(void) { return false; }
|
||||
#else
|
||||
|
||||
#define cpuid(in,a,b,c,d) \
|
||||
asm("pushl %%ebx\n\t" "cpuid\n\t" "movl %%ebx,%%esi\n\t" "pop %%ebx": "=a" (a), "=S" (b), "=c" (c), "=d" (d) : "a" (in));
|
||||
|
||||
@@ -45,3 +53,5 @@ bool Check3DNowTechnology(void)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,6 +13,10 @@ bool CReliableTimer::sm_bUseQPC = false;
|
||||
#include "winlite.h"
|
||||
#endif
|
||||
|
||||
#ifdef POSIX
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -83,6 +87,10 @@ int64 CReliableTimer::GetPerformanceCountNow()
|
||||
uint64 ulNow;
|
||||
SYS_TIMEBASE_GET( ulNow );
|
||||
return ulNow;
|
||||
#elif defined( __arm__ ) && defined (POSIX)
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
|
||||
#else
|
||||
uint64 un64;
|
||||
__asm__ __volatile__ (
|
||||
|
||||
+2
-1
@@ -3337,8 +3337,9 @@ const Tier1FullHTMLEntity_t g_Tier1_FullHTMLEntities[] =
|
||||
{ L'\u00FF', "ÿ", 6 },
|
||||
{ 0, NULL, 0 } // sentinel for end of array
|
||||
};
|
||||
#ifdef _WIN32
|
||||
#pragma warning( pop )
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
bool V_BasicHtmlEntityEncode( char *pDest, const int nDestSize, char const *pIn, const int nInSize, bool bPreserveWhitespace /*= false*/ )
|
||||
|
||||
+2
-1
@@ -68,7 +68,8 @@ def build(bld):
|
||||
'.',
|
||||
'../public',
|
||||
'../public/tier1',
|
||||
'../public/tier0'
|
||||
'../public/tier0',
|
||||
'../common'
|
||||
]
|
||||
|
||||
defines = []
|
||||
|
||||
Reference in New Issue
Block a user