diff --git a/src/smack1.c b/src/smack1.c index 391d5f0f..c89ba952 100644 --- a/src/smack1.c +++ b/src/smack1.c @@ -119,9 +119,8 @@ #elif defined(__FreeBSD__) #include #include -#define __rdtsc rdtsc -#if (__ARM_ARCH >= 6) // V6 is the earliest arch that has a standard cyclecount -unsigned long long rdtsc(void) +#if (__ARM_ARCH >= 6 && __ARM_ARCH <= 7) // V6 is the earliest arch that has a standard cyclecount +unsigned long long __rdtsc(void) { uint32_t pmccntr; uint32_t pmuseren; @@ -138,6 +137,10 @@ unsigned long long rdtsc(void) } return 0; } +#elif defined(__aarch64__) +#define __rdtsc() 0 +#else +#define __rdtsc rdtsc #endif #elif defined (__llvm__) #if defined(i386) || defined(__i386__)