Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-08-05 13:24:14 +0300
committerJean-Baptiste Kempf <jb@videolan.org>2020-08-06 17:02:08 +0300
commit7c4cbbf8d9b0deb06f67cd402a22136014abba45 (patch)
tree090cb88fc5da0da59ac968890ca01492fdbf2678 /tests
parentc3a128842d7ce84074aed1a2c1ff691e12406721 (diff)
checkasm: Use mach_absolute_time() as timer on darwin on ARM
The cycle counter instructions aren't accessible on iOS/macOS on ARM. The mach_absolute_time() function has much coarser precision, but is the least bad option available.
Diffstat (limited to 'tests')
-rw-r--r--tests/checkasm/checkasm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index 27c28d7..2a3391b 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -127,6 +127,9 @@ static inline uint64_t readtime(void) {
}
#define readtime readtime
#endif
+#elif (ARCH_AARCH64 || ARCH_ARM) && defined(__APPLE__)
+#include <mach/mach_time.h>
+#define readtime() mach_absolute_time()
#elif ARCH_AARCH64
#ifdef _MSC_VER
#include <windows.h>