smol-gilbraltar/include/cpu_aarch64.h
2024-12-23 01:46:17 +01:00

13 lines
235 B
C

#ifndef __GILBRALTAR_CPU_AARCH64__
#define __GILBRALTAR_CPU_AARCH64__
#include <stdint.h>
static inline uint64_t cpu_cntpct(void) {
uint64_t val;
__asm__ __volatile("mrs %0, cntpct_el0" : "=r"(val)::);
return (val);
}
#endif