Enable profiling build for ARM64.
This commit is contained in:
parent
e53e48b88c
commit
c3353c0a47
1 changed files with 6 additions and 0 deletions
|
@ -50,9 +50,15 @@ static FORCE_INLINE uint64_t ReadTSC()
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
return __rdtsc();
|
return __rdtsc();
|
||||||
#else
|
#else
|
||||||
|
#if defined(__x86_64__) || defined(__amd64__) || defined(__i386__)
|
||||||
uint32_t hi, lo;
|
uint32_t hi, lo;
|
||||||
__asm__ __volatile__("rdtsc" : "=a"(lo), "=d"(hi));
|
__asm__ __volatile__("rdtsc" : "=a"(lo), "=d"(hi));
|
||||||
return (((uint64_t)hi) << 32) | lo;
|
return (((uint64_t)hi) << 32) | lo;
|
||||||
|
#elif defined(__aarch64__)
|
||||||
|
uint64_t cur;
|
||||||
|
__asm__ __volatile__("mrs %0, cntvct_el0" : "=r"(cur) :: "memory");
|
||||||
|
return cur;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue