From 209e9b9e4b19621bdb68430b383f07a27c8668ac Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Thu, 18 Jan 2024 08:59:36 -0600 Subject: [PATCH] util: add timing assembly for arm64 --- src/util-cpu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util-cpu.c b/src/util-cpu.c index 897eabfa7e..1ae49e7abe 100644 --- a/src/util-cpu.c +++ b/src/util-cpu.c @@ -192,6 +192,10 @@ uint64_t UtilCpuGetTicks(void) ::: "%eax", "%ecx", "%edx"); #endif +#elif defined(__GNUC__) && defined(__aarch64__) + __asm__ __volatile__("isb\n\t" + "mrs %0, cntvct_el0\n\t" + : "=r"(val)); #else /* #if defined(__GNU__) */ //#warning Using inferior version of UtilCpuGetTicks struct timeval now;