mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
new clock logic: cpu ticks and virtual clocks are no longer proportional - added timestamps on the stdio console
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2049 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
effedbc915
commit
1dce7c3c22
4 changed files with 192 additions and 226 deletions
|
@ -107,29 +107,7 @@ int cpu_get_pic_interrupt(CPUState *env)
|
|||
|
||||
/* timers for rdtsc */
|
||||
|
||||
#if defined(__i386__)
|
||||
|
||||
int64_t cpu_get_real_ticks(void)
|
||||
{
|
||||
int64_t val;
|
||||
asm volatile ("rdtsc" : "=A" (val));
|
||||
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
|
||||
#if 0
|
||||
|
||||
static uint64_t emu_time;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue