diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-25 18:57:49 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-25 18:57:49 +0000 |
commit | 1115dde7194fc1c383e2b374697485ec20269cce (patch) | |
tree | 89ac93086b90c3ba3531fe70335cf806b21e22cb /vl.c | |
parent | 57206fd42a0ce94525686b0ea18d0e23d58a89e3 (diff) |
x86-64 port (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@752 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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; +} + #else #error unsupported CPU #endif |