From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcni3-0000yT-6F for qemu-devel@nongnu.org; Fri, 18 Sep 2015 00:55:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zcni2-0004S6-DD for qemu-devel@nongnu.org; Fri, 18 Sep 2015 00:55:43 -0400 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:35705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcni2-0004Rv-7z for qemu-devel@nongnu.org; Fri, 18 Sep 2015 00:55:42 -0400 Received: by pacfv12 with SMTP id fv12so40288414pac.2 for ; Thu, 17 Sep 2015 21:55:41 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Thu, 17 Sep 2015 21:55:18 -0700 Message-Id: <1442552129-19242-12-git-send-email-rth@twiddle.net> In-Reply-To: <1442552129-19242-1-git-send-email-rth@twiddle.net> References: <1442552129-19242-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH v2 11/22] target-cris: Mirror gen_opc_pc into insn_start List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, alex.bennee@linaro.org, aurelien@aurel32.net 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 Signed-off-by: Richard Henderson --- 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 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))) { -- 2.1.0