Try to fix previous commit on 32-bit.
authorCarl Hetherington <carl@carlh.net>
Sat, 14 Jan 2012 23:32:03 +0000 (23:32 +0000)
committerCarl Hetherington <carl@carlh.net>
Sat, 14 Jan 2012 23:32:03 +0000 (23:32 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11248 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/ardour/cycles.h

index a0249f8665db21a631635d4bcbe9c22e589e28b4..01e1d55221f13891a53c96a74e9d0aa372309af3 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