ref: 1306791698acc4983ce85901318eeb2a2a829314
parent: 6c90f005fc267b5a05b37fde91e55d26db932789
author: Martin Storsjö <martin@martin.st>
date: Thu Jun 6 18:32:36 EDT 2019
checkasm: Check for __ARM_ARCH >= 7 for the arm cpu timer inline assembly This fixes building with raspbian compilers, that default to armv6. The isb instruction is unavailable on armv6, and the cycle counter register is accessed differently there as well. This fixes issue #282.
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -144,7 +144,7 @@
}
#define readtime readtime
#endif
-#elif ARCH_ARM && !defined(_MSC_VER)
+#elif ARCH_ARM && !defined(_MSC_VER) && __ARM_ARCH >= 7
static inline uint64_t readtime(void) {
uint32_t cycle_counter;
/* This requires enabling user mode access to the cycle counter (which