Arm64 also defines __ARM_ARCH.

This commit is contained in:
Bartosz Taudul 2018-04-26 17:39:04 +02:00
parent a3f5003f88
commit 6a2311a7b7

View File

@ -68,16 +68,16 @@ public:
static tracy_force_inline int64_t GetTime( uint32_t& cpu )
{
#ifdef TRACY_HW_TIMER
# if __ARM_ARCH >= 6
int64_t t;
cpu = 0xFFFFFFFF;
asm volatile ( "mrrc p15, 1, %Q0, %R0, c14" : "=r" (t) );
return t;
# elif defined __aarch64__
# if defined __aarch64__
int64_t t;
cpu = 0xFFFFFFFF;
asm volatile ( "mrs %0, cntvct_el0" : "=r" (t) );
return t;
# elif __ARM_ARCH >= 6
int64_t t;
cpu = 0xFFFFFFFF;
asm volatile ( "mrrc p15, 1, %Q0, %R0, c14" : "=r" (t) );
return t;
# elif defined _MSC_VER || defined __CYGWIN__
const auto t = int64_t( __rdtscp( &cpu ) );
return t;
@ -95,14 +95,14 @@ public:
static tracy_force_inline int64_t GetTime()
{
#ifdef TRACY_HW_TIMER
# if __ARM_ARCH >= 6
int64_t t;
asm volatile ( "mrrc p15, 1, %Q0, %R0, c14" : "=r" (t) );
return t;
# elif defined __aarch64__
# if defined __aarch64__
int64_t t;
asm volatile ( "mrs %0, cntvct_el0" : "=r" (t) );
return t;
# elif __ARM_ARCH >= 6
int64_t t;
asm volatile ( "mrrc p15, 1, %Q0, %R0, c14" : "=r" (t) );
return t;
# elif defined _MSC_VER || defined __CYGWIN__
unsigned int dontcare;
const auto t = int64_t( __rdtscp( &dontcare ) );