From 55e06745a639d86921e48ff56aa0c375a46d6421 Mon Sep 17 00:00:00 2001 From: M Joonas Pihlaja Date: Thu, 25 Sep 2008 00:17:57 +0300 Subject: [PATCH] [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. --- perf/cairo-perf-posix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perf/cairo-perf-posix.c b/perf/cairo-perf-posix.c index 8bf78cec5..8bc4e092b 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