Patchwork [09/10] target-alpha: Implement RPCC.

login
register
mail settings
Submitter Richard Henderson
Date April 12, 2010, 11:18 p.m.
Message ID <751c5ea9e159cd7a29ca24b94796fe71fc15c4ae.1271114639.git.rth@twiddle.net>
Download mbox | patch
Permalink /patch/50008/
State New
Headers show

Comments

Richard Henderson - April 12, 2010, 11:18 p.m.
A minimal implementation that more or less corresponds to the
user-level version used by target-i386.  More hoops will want
to be jumped through when alpha gets system-level emulation.

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target-alpha/cpu.h       |    1 -
 target-alpha/op_helper.c |    5 +++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h
index 817504b..314d6ac 100644
--- a/target-alpha/cpu.h
+++ b/target-alpha/cpu.h
@@ -355,7 +355,6 @@  struct CPUAlphaState {
     uint64_t ir[31];
     float64 fir[31];
     uint64_t pc;
-    uint32_t pcc[2];
     uint64_t ipr[IPR_LAST];
     uint64_t ps;
     uint64_t unique;
diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c
index bfc095c..ff5ae26 100644
--- a/target-alpha/op_helper.c
+++ b/target-alpha/op_helper.c
@@ -21,6 +21,7 @@ 
 #include "host-utils.h"
 #include "softfloat.h"
 #include "helper.h"
+#include "qemu-timer.h"
 
 /*****************************************************************************/
 /* Exceptions processing helpers */
@@ -33,8 +34,8 @@  void QEMU_NORETURN helper_excp (int excp, int error)
 
 uint64_t helper_load_pcc (void)
 {
-    /* XXX: TODO */
-    return 0;
+    /* ??? This isn't a timer for which we have any rate info.  */
+    return (uint32_t)cpu_get_real_ticks();
 }
 
 uint64_t helper_load_fpcr (void)