Patchwork [1/6] target-alpha: Honor icount for RPCC instruction.

login
register
mail settings
Submitter Richard Henderson
Date Sept. 22, 2011, 3:30 p.m.
Message ID <1316705449-17187-2-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/115957/
State New
Headers show

Comments

Richard Henderson - Sept. 22, 2011, 3:30 p.m.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target-alpha/translate.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

Patch

diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 1e224a2..fb2e9e5 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -2721,8 +2721,16 @@  static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)
             break;
         case 0xC000:
             /* RPCC */
-            if (ra != 31)
-                gen_helper_load_pcc(cpu_ir[ra]);
+            if (ra != 31) {
+                if (use_icount) {
+                    gen_io_start();
+                    gen_helper_load_pcc(cpu_ir[ra]);
+                    gen_io_end();
+                    ret = EXIT_PC_STALE;
+                } else {
+                    gen_helper_load_pcc(cpu_ir[ra]);
+                }
+            }
             break;
         case 0xE000:
             /* RC */