Update arch macros.

This commit is contained in:
2026-03-13 13:10:50 -07:00
parent 76524327d8
commit dd0e4bd14f
+4 -5
View File
@@ -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 <unistd.h> // close, read
// NOTE: This is so it compiles on ARM.
#if ARCH_X64 || ARCH_X86
#if __x86_64__ || __i386__
#include <x86intrin.h>
#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));