summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2008-09-25 00:17:57 +0300
committerM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2008-09-25 00:17:57 +0300
commit55e06745a639d86921e48ff56aa0c375a46d6421 (patch)
tree1dbe9b229c50211c199b0d64459a7b17918800dd
parent2fb59b3ebd885e109160326825325be3907ed48e (diff)
[perf-suite] Explicitly read the results of rdtsc from edx:eax.
The =A format used to read a 64 bit result from rdtsc works on x86, but not on x86-64.
-rw-r--r--perf/cairo-perf-posix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/perf/cairo-perf-posix.c b/perf/cairo-perf-posix.c
index 8bf78cec..8bc4e092 100644
--- a/perf/cairo-perf-posix.c
+++ b/perf/cairo-perf-posix.c
@@ -70,9 +70,9 @@
static inline cairo_perf_ticks_t
oil_profile_stamp_rdtsc (void)
{
- uint64_t ts;
- __asm__ __volatile__("rdtsc\n" : "=A" (ts));
- return ts;
+ unsigned a, d;
+ __asm__ __volatile__("rdtsc" : "=a" (a), "=d" (d));
+ return ((uint64_t)a) | (((uint64_t)d) << 32);
}
#define OIL_STAMP oil_profile_stamp_rdtsc
#endif