From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeUGA-0002dK-8v for qemu-devel@nongnu.org; Tue, 22 Sep 2015 16:33:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeUG9-0006iL-90 for qemu-devel@nongnu.org; Tue, 22 Sep 2015 16:33:54 -0400 Received: from mail-io0-x232.google.com ([2607:f8b0:4001:c06::232]:36157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeUG9-0006iE-4Y for qemu-devel@nongnu.org; Tue, 22 Sep 2015 16:33:53 -0400 Received: by ioii196 with SMTP id i196so26430390ioi.3 for ; Tue, 22 Sep 2015 13:33:52 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Tue, 22 Sep 2015 13:24:57 -0700 Message-Id: <1442953507-4074-16-git-send-email-rth@twiddle.net> In-Reply-To: <1442953507-4074-1-git-send-email-rth@twiddle.net> References: <1442953507-4074-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH v3 15/25] target-sparc: Add npc state to 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 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-sparc/cpu.h | 1 + target-sparc/translate.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 72ea171..ac8f383 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -236,6 +236,7 @@ typedef struct trap_state { uint32_t tt; } trap_state; #endif +#define TARGET_INSN_START_EXTRA_WORDS 1 typedef struct sparc_def_t { const char *name; diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 25b5bc0..6e5b82d 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -5257,7 +5257,12 @@ static inline void gen_intermediate_code_internal(SPARCCPU *cpu, tcg_ctx.gen_opc_icount[lj] = num_insns; } } - tcg_gen_insn_start(dc->pc); + if (dc->npc & JUMP_PC) { + assert(dc->jump_pc[1] == dc->pc + 4); + tcg_gen_insn_start(dc->pc, dc->jump_pc[0] | JUMP_PC); + } else { + tcg_gen_insn_start(dc->pc, dc->npc); + } num_insns++; if (unlikely(cpu_breakpoint_test(cs, dc->pc, BP_ANY))) { -- 2.4.3