Received: from eggs.gnu.org ([208.118.235.92]:42799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKHk2-0007fJ-93 for qemu-devel@nongnu.org; Fri, 05 Oct 2012 19:55:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKHk1-0003jh-6g for qemu-devel@nongnu.org; Fri, 05 Oct 2012 19:55:38 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:49470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKHk1-0003Pu-0V for qemu-devel@nongnu.org; Fri, 05 Oct 2012 19:55:37 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so2425530pbb.4 for ; Fri, 05 Oct 2012 16:55:36 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Fri, 5 Oct 2012 16:55:09 -0700 Message-Id: <1349481310-9237-23-git-send-email-rth@twiddle.net> In-Reply-To: <1349481310-9237-1-git-send-email-rth@twiddle.net> References: <1349481310-9237-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 22/23] target-sparc: Fall through from not-taken trap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl Now that we've cleaned up global temporary allocation, we can continue translating the fallthru path of a conditional trap. Signed-off-by: Richard Henderson --- target-sparc/translate.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 48c245e..a7f6407 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -2573,13 +2573,15 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) gen_helper_raise_exception(cpu_env, trap); tcg_temp_free_i32(trap); - if (cond != 8) { + if (cond == 8) { + /* An unconditional trap ends the TB. */ + dc->is_br = 1; + goto jmp_insn; + } else { + /* A conditional trap falls through to the next insn. */ gen_set_label(l1); - gen_op_next_insn(); - tcg_gen_exit_tb(0); + break; } - dc->is_br = 1; - goto jmp_insn; } else if (xop == 0x28) { rs1 = GET_FIELD(insn, 13, 17); switch(rs1) { -- 1.7.11.4