remove $Id$, it doesn't work with git anyway
[libfirm] / ir / stat / stat_timing.h
index 026248f..645b768 100644 (file)
@@ -21,7 +21,6 @@
  * @file
  * @brief   OS abstraction from time measurement
  * @author  Sebastian Hack, Michael Beck, Matthias Braun
- * @version $Id$
  */
 #ifndef FIRM_STAT_TIMING_H
 #define FIRM_STAT_TIMING_H
 
 #if defined(__GNUC__)
 typedef unsigned long long timing_ticks_t;
-static inline timing_ticks_t __timing_ticks(void) { timing_ticks_t result; __asm__ __volatile__ ("rdtsc" : "=A" (result)); return result; }
+static inline timing_ticks_t __timing_ticks(void)
+{
+       unsigned h;
+       unsigned l;
+       __asm__ volatile("rdtsc" : "=a" (l), "=d" (h));
+       return (timing_ticks_t)h << 32 | l;
+}
 
 #elif defined(_MSC_VER)
 #include <intrin.h>