Skip to content

Commit

Permalink
Add ARM64 #ifdefs
Browse files Browse the repository at this point in the history
  • Loading branch information
hmartinez82 committed Dec 14, 2024
1 parent 90a87de commit 8792c46
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 7 deletions.
4 changes: 2 additions & 2 deletions client/miniaudio/dr_mp3.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ static int drmp3_have_simd(void)
return g_have_simd - 1;
#endif
}
#elif defined(__ARM_NEON) || defined(__aarch64__)
#elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)
#include <arm_neon.h>
#define DRMP3_HAVE_SSE 0
#define DRMP3_HAVE_SIMD 1
Expand Down Expand Up @@ -670,7 +670,7 @@ static int drmp3_have_simd(void)

#endif

#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__)
#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64)
#define DRMP3_HAVE_ARMV6 1
static __inline__ __attribute__((always_inline)) drmp3_int32 drmp3_clip_int16_arm(int32_t a)
{
Expand Down
2 changes: 1 addition & 1 deletion ctf/q_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ extern vec3_t vec3_origin;
// microsoft's fabs seems to be ungodly slow...
//float Q_fabs (float f);
//#define fabs(f) Q_fabs(f)
#if !defined C_ONLY && !defined __linux__ && !defined __sgi && !defined _M_X64 && !defined __APPLE__
#if !defined C_ONLY && !defined __linux__ && !defined __sgi && !defined _M_X64 && !defined __APPLE__ && !defined _M_ARM64
extern long Q_ftol( float f );
#else
#define Q_ftol( f ) ( long ) (f)
Expand Down
2 changes: 1 addition & 1 deletion game/q_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ extern vec3_t vec3_origin;
// microsoft's fabs seems to be ungodly slow...
//float Q_fabs (float f);
//#define fabs(f) Q_fabs(f)
#if !defined C_ONLY && !defined __linux__ && !defined __sgi && !defined _M_X64 && !defined __APPLE__
#if !defined C_ONLY && !defined __linux__ && !defined __sgi && !defined _M_X64 && !defined __APPLE__ && !defined _M_ARM64
extern long Q_ftol( float f );
#else
#define Q_ftol( f ) ( long ) (f)
Expand Down
2 changes: 2 additions & 0 deletions qcommon/qcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define CPUSTRING "x64"
#elif defined _M_ALPHA
#define CPUSTRING "AXP"
#elif defined _M_ARM64
#define CPUSTRING "ARM64"
#endif

#elif defined __linux__
Expand Down
2 changes: 1 addition & 1 deletion rogue/q_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ extern vec3_t vec3_origin;
// microsoft's fabs seems to be ungodly slow...
//float Q_fabs (float f);
//#define fabs(f) Q_fabs(f)
#if !defined C_ONLY && !defined __linux__ && !defined __sgi
#if !defined C_ONLY && !defined __linux__ && !defined __sgi && !defined _M_ARM64
extern long Q_ftol( float f );
#else
#define Q_ftol( f ) ( long ) (f)
Expand Down
2 changes: 1 addition & 1 deletion smd/q_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ extern vec3_t vec3_origin;
// microsoft's fabs seems to be ungodly slow...
//float Q_fabs (float f);
//#define fabs(f) Q_fabs(f)
#if !defined C_ONLY && !defined __linux__ && !defined __sgi
#if !defined C_ONLY && !defined __linux__ && !defined __sgi && !defined _M_ARM64
extern long Q_ftol( float f );
#else
#define Q_ftol( f ) ( long ) (f)
Expand Down
9 changes: 9 additions & 0 deletions win32/sys_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,15 @@ void *Sys_GetGameAPI (void *parms)
const char *debugdir = "debugx64";
#endif

#elif defined _M_ARM64
const char* gamename = "gameARM64.dll";

#ifdef NDEBUG
const char* debugdir = "releaseARM64";
#else
const char* debugdir = "debugARM64";
#endif

#elif defined _M_ALPHA
const char *gamename = "gameaxp.dll";

Expand Down
2 changes: 1 addition & 1 deletion xatrix/q_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ extern vec3_t vec3_origin;
// microsoft's fabs seems to be ungodly slow...
//float Q_fabs (float f);
//#define fabs(f) Q_fabs(f)
#if !defined C_ONLY && !defined __linux__ && !defined __sgi
#if !defined C_ONLY && !defined __linux__ && !defined __sgi && !defined _M_ARM64
extern long Q_ftol( float f );
#else
#define Q_ftol( f ) ( long ) (f)
Expand Down

0 comments on commit 8792c46

Please sign in to comment.