提交 14a6063a 编写于 作者: R Richard Henderson 提交者: Aurelien Jarno

Implement cpu_get_real_ticks for Alpha.

Signed-off-by: NRichard Henderson <rth@twiddle.net>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 18f8e2c0
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册