提交 e463b581 编写于 作者: B bellard

rdtsc fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@695 c046a42c-6fe2-441c-8c8c-71466251a162
上级 11d9f695
......@@ -1796,7 +1796,7 @@ void helper_rdtsc(void)
{
uint64_t val;
#if defined(__i386__) || defined(__x86_64__)
asm("rdtsc" : "=A" (val));
asm volatile ("rdtsc" : "=A" (val));
#else
/* better than nothing: the time increases */
val = emu_time++;
......
......@@ -341,7 +341,7 @@ int64_t cpu_get_real_ticks(void)
int64_t cpu_get_real_ticks(void)
{
int64_t val;
asm("rdtsc" : "=A" (val));
asm volatile ("rdtsc" : "=A" (val));
return val;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册