extern cycles_t cacheflush_time;
+#if defined(__x86_64__)
+
#define rdtscll(lo, hi) \
__asm__ __volatile__("rdtsc" : "=a" (lo), "=d" (hi))
return lo;
}
+#else
+
+#define rdtscll(val) \
+__asm__ __volatile__("rdtsc" : "=A" (val))
+
+static inline cycles_t get_cycles (void)
+{
+ cycles_t ret;
+
+ rdtscll(ret);
+ return ret & 0xffffffff;
+}
+#endif
+
#elif defined(__powerpc__)
#define CPU_FTR_601 0x00000100
/* debian: sparc, arm, m68k */
+#ifndef COMPILER_MSVC
+/* GRRR... Annoyingly, #warning aborts the compilation for MSVC !! */
#warning You are compiling libardour on a platform for which ardour/cycles.h needs work
+#endif
#include <sys/time.h>