ensure that Lua DSP scripts are configured (even with 0 channels)
[ardour.git] / libs / ardour / ardour / cycles.h
index bfa42a157ed394d00fd36a0b1f1343215a255585..dc1095db7b60939122a07b74f9e5629b92781f98 100644 (file)
@@ -43,8 +43,23 @@ typedef uint64_t cycles_t;
 
 extern cycles_t cacheflush_time;
 
-#define rdtscll(val) \
-     __asm__ __volatile__("rdtsc" : "=A" (val))
+#if defined(__x86_64__)
+
+#define rdtscll(lo, hi)                                                \
+       __asm__ __volatile__("rdtsc" : "=a" (lo), "=d" (hi))
+
+static inline cycles_t get_cycles (void)
+{
+       cycles_t lo, hi;
+
+       rdtscll(lo, hi);
+       return lo;
+}
+
+#else
+
+#define rdtscll(val)                           \
+__asm__ __volatile__("rdtsc" : "=A" (val))
 
 static inline cycles_t get_cycles (void)
 {
@@ -53,6 +68,7 @@ static inline cycles_t get_cycles (void)
        rdtscll(ret);
        return ret & 0xffffffff;
 }
+#endif
 
 #elif defined(__powerpc__)
 
@@ -200,7 +216,10 @@ static inline cycles_t get_cycles (void)
 
 /* 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>