Commit 1115dde7 authored by bellard's avatar bellard
Browse files

x86-64 port (Jocelyn Mayer)

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162
parent 57206fd4
......@@ -362,6 +362,19 @@ int64_t cpu_get_real_ticks(void)
return val;
#elif defined(__x86_64__)
int64_t cpu_get_real_ticks(void)
uint32_t low,high;
int64_t val;
asm volatile("rdtsc" : "=a" (low), "=d" (high));
val = high;
val <<= 32;
val |= low;
return val;
#error unsupported CPU
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment