Message ID | 1442552129-19242-12-git-send-email-rth@twiddle.net |
---|---|
State | New |
Headers | show |
On 2015-09-17 21:55, Richard Henderson wrote: > 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. > > Reviewed-by: Peter Maydell <peter.maydell@linaro.org> > Signed-off-by: Richard Henderson <rth@twiddle.net> > --- > target-cris/translate.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
diff --git a/target-cris/translate.c b/target-cris/translate.c index 477bddc..3d55a6a 100644 --- a/target-cris/translate.c +++ b/target-cris/translate.c @@ -3174,7 +3174,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); num_insns++; if (unlikely(cpu_breakpoint_test(cs, dc->pc, BP_ANY))) {