diff --git a/src/asmjit/base/cputicks.cpp b/src/asmjit/base/cputicks.cpp index 8f9a624..cb10ff1 100644 --- a/src/asmjit/base/cputicks.cpp +++ b/src/asmjit/base/cputicks.cpp @@ -21,6 +21,17 @@ # include #endif // ASMJIT_OS_MAC +// [Dependencies - Windows] +#if defined(ASMJIT_OS_WINDOWS) +// `_InterlockedCompareExchange` is only available as intrinsic (MS Compiler). +# if defined(_MSC_VER) +# include +# pragma intrinsic(_InterlockedCompareExchange) +# else +# define _InterlockedCompareExchange InterlockedCompareExchange +# endif // _MSC_VER +#endif // ASMJIT_OS_WINDOWS + // [Api-Begin] #include "../apibegin.h" @@ -31,14 +42,6 @@ namespace asmjit { // ============================================================================ #if defined(ASMJIT_OS_WINDOWS) - -// `_InterlockedCompareExchange` is only available as intrinsic (MS Compiler). -#if defined(_MSC_VER) -# pragma intrinsic(_InterlockedCompareExchange) -#else -# define _InterlockedCompareExchange InterlockedCompareExchange -#endif // _MSC_VER - static volatile uint32_t CpuTicks_hiResOk; static volatile double CpuTicks_hiResFreq;