Merge pull request #87 from akopytov/aarch64_timer

Add AArch64 timer support to rdtsc().
ck_pring
Olivier Houchard 8 years ago committed by GitHub
commit d8d5b01a1a

@ -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