From dd0e4bd14ffb96409fb67eb497442c6e25521b3c Mon Sep 17 00:00:00 2001 From: igor Date: Fri, 13 Mar 2026 13:10:50 -0700 Subject: [PATCH] Update arch macros. --- sdl_handmade.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sdl_handmade.cpp b/sdl_handmade.cpp index c678ba0..24946d1 100644 --- a/sdl_handmade.cpp +++ b/sdl_handmade.cpp @@ -1,4 +1,3 @@ -#include "base_context_cracking.h" #include "base_core.h" #include "sdl_handmade.h" #include "handmade.cpp" @@ -13,7 +12,7 @@ #include // close, read // NOTE: This is so it compiles on ARM. -#if ARCH_X64 || ARCH_X86 +#if __x86_64__ || __i386__ #include #endif @@ -383,14 +382,14 @@ S32 main(int argc, char *argv[]) GlobalPerfCountFrequency = SDL_GetPerformanceFrequency(); U64 LastCounter; -#if ARCH_X64 || ARCH_X86 +#if __x86_64__ || __i386__ U64 LastCycleCount; #endif while(GlobalRunning) { LastCounter = SDLGetWallClock(); -#if ARCH_X64 || ARCH_X86 +#if __x86_64__ || __i386__ LastCycleCount = __rdtsc(); // NOTE: rdtsc reports clock cylces, however it is not meant for really precise profiler work as the value returned is varied. #endif // Also, __rdtsc is not available on MacOS ARM; I have not checked MacOS x64. @@ -507,7 +506,7 @@ S32 main(int argc, char *argv[]) LastCounter = EndCounter; -#if ARCH_X64 || ARCH_X86 +#if __x86_64__ || __i386__ U64 EndCycleCount = __rdtsc(); U64 CyclesElapsed = EndCycleCount - LastCycleCount; F64 MCPF = ((F64)CyclesElapsed / (1000.0f * 1000.0f));