mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Arm64 also defines __ARM_ARCH.
This commit is contained in:
parent
a3f5003f88
commit
6a2311a7b7
@ -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 ) );
|
||||
|
Loading…
Reference in New Issue
Block a user