mirror of
https://github.com/xemu-project/xemu.git
synced 2025-04-02 11:11:48 -04:00
Implement cpu_get_real_ticks for Alpha.
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
18f8e2c08b
commit
14a6063a91
1 changed files with 13 additions and 0 deletions
13
qemu-timer.h
13
qemu-timer.h
|
@ -209,6 +209,19 @@ static inline int64_t cpu_get_real_ticks(void)
|
|||
return (int64_t)(count * cyc_per_count);
|
||||
}
|
||||
|
||||
#elif defined(__alpha__)
|
||||
|
||||
static inline int64_t cpu_get_real_ticks(void)
|
||||
{
|
||||
uint64_t cc;
|
||||
uint32_t cur, ofs;
|
||||
|
||||
asm volatile("rpcc %0" : "=r"(cc));
|
||||
cur = cc;
|
||||
ofs = cc >> 32;
|
||||
return cur - ofs;
|
||||
}
|
||||
|
||||
#else
|
||||
/* The host CPU doesn't have an easily accessible cycle counter.
|
||||
Just return a monotonically increasing value. This will be
|
||||
|
|
Loading…
Add table
Reference in a new issue