ensure that Lua DSP scripts are configured (even with 0 channels)
[ardour.git] / libs / ardour / ardour / cycles.h
index a0249f8665db21a631635d4bcbe9c22e589e28b4..dc1095db7b60939122a07b74f9e5629b92781f98 100644 (file)
@@ -43,6 +43,8 @@ typedef uint64_t cycles_t;
 
 extern cycles_t cacheflush_time;
 
+#if defined(__x86_64__)
+
 #define rdtscll(lo, hi)                                                \
        __asm__ __volatile__("rdtsc" : "=a" (lo), "=d" (hi))
 
@@ -54,6 +56,20 @@ static inline cycles_t get_cycles (void)
        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
@@ -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>