From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX0yb-0003jV-JB for qemu-devel@nongnu.org; Wed, 02 Sep 2015 01:52:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZX0yX-0004LV-S0 for qemu-devel@nongnu.org; Wed, 02 Sep 2015 01:52:53 -0400 Received: from mail-qg0-x229.google.com ([2607:f8b0:400d:c04::229]:32917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX0yX-0004LK-OM for qemu-devel@nongnu.org; Wed, 02 Sep 2015 01:52:49 -0400 Received: by qgev79 with SMTP id v79so11949649qge.0 for ; Tue, 01 Sep 2015 22:52:49 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Tue, 1 Sep 2015 22:51:52 -0700 Message-Id: <1441173123-25540-10-git-send-email-rth@twiddle.net> In-Reply-To: <1441173123-25540-1-git-send-email-rth@twiddle.net> References: <1441173123-25540-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 09/20] 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: dl.soluz@gmx.net, atar4qemu@gmail.com, 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. 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 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