qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 09/20] target-cris: Mirror gen_opc_pc into insn_star


From: Richard Henderson
Subject: [Qemu-devel] [PATCH 09/20] target-cris: Mirror gen_opc_pc into insn_start
Date: Tue, 1 Sep 2015 22:51:52 -0700

This perhaps isn't ideal in terms of (ab)using the "pc" field
to encode both pc and ppc + delay branch state, as one has to
be aware of this when examining opcode dumps.

But it preserves existing logic, which will be good for bisection,
and it certainly does save storage space.

Signed-off-by: Richard Henderson <address@hidden>
---
 target-cris/translate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target-cris/translate.c b/target-cris/translate.c
index 3279bad..3c8fac4 100644
--- a/target-cris/translate.c
+++ b/target-cris/translate.c
@@ -3206,7 +3206,8 @@ gen_intermediate_code_internal(CRISCPU *cpu, 
TranslationBlock *tb,
             tcg_ctx.gen_opc_instr_start[lj] = 1;
             tcg_ctx.gen_opc_icount[lj] = num_insns;
         }
-        tcg_gen_insn_start(dc->pc);
+        tcg_gen_insn_start(dc->delayed_branch == 1
+                           ? dc->ppc | 1 : dc->pc);
 
         /* Pretty disas.  */
         LOG_DIS("%8.8x:\t", dc->pc);
-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]