mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Fix builds with MingW.
This commit is contained in:
@@ -17,13 +17,13 @@
|
||||
#include "../common/TracyMutex.hpp"
|
||||
#include "../common/TracySystem.hpp"
|
||||
|
||||
#if defined _MSC_VER || defined __CYGWIN__
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
# include <intrin.h>
|
||||
#endif
|
||||
|
||||
#if defined _MSC_VER || defined __CYGWIN__ || ( ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 ) && !defined __ANDROID__ ) || __ARM_ARCH >= 6
|
||||
#if defined _WIN32 || defined __CYGWIN__ || ( ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 ) && !defined __ANDROID__ ) || __ARM_ARCH >= 6
|
||||
# define TRACY_HW_TIMER
|
||||
# if defined _MSC_VER || defined __CYGWIN__
|
||||
# if defined _WIN32 || defined __CYGWIN__
|
||||
// Enable optimization for MSVC __rdtscp() intrin, saving one LHS of a cpu value on the stack.
|
||||
// This comes at the cost of an unaligned memory write.
|
||||
# define TRACY_RDTSCP_OPT
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
# if __ARM_ARCH >= 6
|
||||
cpu = 0xFFFFFFFF;
|
||||
return GetTimeImpl();
|
||||
# elif defined _MSC_VER || defined __CYGWIN__
|
||||
# elif defined _WIN32 || defined __CYGWIN__
|
||||
const auto t = int64_t( __rdtscp( &cpu ) );
|
||||
return t;
|
||||
# elif defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
#ifdef TRACY_HW_TIMER
|
||||
# if __ARM_ARCH >= 6
|
||||
return GetTimeImpl();
|
||||
# elif defined _MSC_VER || defined __CYGWIN__
|
||||
# elif defined _WIN32 || defined __CYGWIN__
|
||||
unsigned int dontcare;
|
||||
const auto t = int64_t( __rdtscp( &dontcare ) );
|
||||
return t;
|
||||
|
||||
Reference in New Issue
Block a user