Add AArch64 timer support to rdtsc().

Add support for RDTSC-like timer on AArch64. This is only used by the
internal regression/benchmark test suite.
ck_pring
Alexey Kopytov 8 years ago
parent 5f1be5dc83
commit ab8f2b0344

@ -442,6 +442,11 @@ rdtsc(void)
} while (snapshot != high);
return (((uint64_t)high << 32) | low);
#elif defined(__aarch64__)
uint64_t r;
__asm __volatile__ ("mrs %0, cntvct_el0" : "=r" (r) : : "memory");
return r;
#else
return 0;
#endif

Loading…
Cancel
Save