[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/10] Implement cpu_get_real_ticks for Alpha.
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 10/10] Implement cpu_get_real_ticks for Alpha. |
Date: |
Mon, 12 Apr 2010 16:19:26 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
qemu-timer.h | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/qemu-timer.h b/qemu-timer.h
index d2e15f4..6e2d2e1 100644
--- a/qemu-timer.h
+++ b/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
--
1.6.2.5
- Re: [Qemu-devel] [PATCH 13/13] target-alpha: Implement RPCC., (continued)
- [Qemu-devel] [PATCH 12/13] target-alpha: Fix load-locked/store-conditional., Richard Henderson, 2010/04/07
- [Qemu-devel] [PATCH 00/10] target-alpha improvments, version 5, Richard Henderson, 2010/04/12
- [Qemu-devel] [PATCH 03/10] target-alpha: Implement cvtlq inline., Richard Henderson, 2010/04/12
- [Qemu-devel] [PATCH 05/10] target-alpha: Update commentary for opcode 0x1A., Richard Henderson, 2010/04/12
- [Qemu-devel] [PATCH 04/10] target-alpha: Emit goto_tb opcodes., Richard Henderson, 2010/04/12
- [Qemu-devel] [PATCH 08/10] target-alpha: Fix load-locked/store-conditional., Richard Henderson, 2010/04/12
- [Qemu-devel] [PATCH 07/10] target-alpha: Indicate NORETURN status when raising exception., Richard Henderson, 2010/04/12
- [Qemu-devel] [PATCH 01/10] target-alpha: Implement cpys{, n, e} inline., Richard Henderson, 2010/04/12
- [Qemu-devel] [PATCH 06/10] target-alpha: Enable NPTL., Richard Henderson, 2010/04/12
- [Qemu-devel] [PATCH 10/10] Implement cpu_get_real_ticks for Alpha.,
Richard Henderson <=
- [Qemu-devel] [PATCH 02/10] target-alpha: Implement rs/rc properly., Richard Henderson, 2010/04/12
- [Qemu-devel] [PATCH 09/10] target-alpha: Implement RPCC., Richard Henderson, 2010/04/12