projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57206fd
)
x86-64 port (Jocelyn Mayer)
author
bellard
<bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 25 Apr 2004 18:57:49 +0000
(18:57 +0000)
committer
bellard
<bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 25 Apr 2004 18:57:49 +0000
(18:57 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@752
c046a42c
-6fe2-441c-8c8c-
71466251a162
vl.c
patch
|
blob
|
history
diff --git
a/vl.c
b/vl.c
index
18bdd0d
..
8206706
100644
(file)
--- a/
vl.c
+++ b/
vl.c
@@
-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