From patchwork Fri Oct 5 23:55:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 189635 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2977A2C031D for ; Sat, 6 Oct 2012 10:19:57 +1000 (EST) Received: from localhost ([::1]:41541 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKHlB-0001D3-Ax for incoming@patchwork.ozlabs.org; Fri, 05 Oct 2012 19:56:49 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=YBw5yUF1Ay6RSYb/GLSKCv9G9FaA7mCIhfop6V2NsYY=; b=jidXh6b3V/QWmva28qcTHXo13OHj4kybrzs8jiCCUuoTXdwrILz56Wbf9HNIH0k+i5 t3++s5aVyEkRconhiopqRARs+rwV9oaOvZw8ePSK3zfP5EqoSFkzLwVDGjzYGZ/UBSfK mgWa0NnDfYSUw7YqV4s8UVhus7E/JWtJfAogxH/jxv0LTQ+PDVXQd9dg2hwn+wYJTJJl zQ0YWqLAWXsHXI6hnPy27hLHLiMaSOQ/q5fXIHksWytxar8PwlPo41jjZxYRXDLSxjYd ZbHSDyEcGCv15d2+NoJyKgLzl9DW/1ScqSXIZ8PF4uPvYeVuLaNWUFdMPd+J258v3eAW B6Ig== Received: by 10.66.77.70 with SMTP id q6mr25647058paw.24.1349481336547; Fri, 05 Oct 2012 16:55:36 -0700 (PDT) Received: from anchor.twiddle.home (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id tw5sm6751873pbc.48.2012.10.05.16.55.35 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Oct 2012 16:55:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 5 Oct 2012 16:55:09 -0700 Message-Id: <1349481310-9237-23-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1349481310-9237-1-git-send-email-rth@twiddle.net> References: <1349481310-9237-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: Blue Swirl Subject: [Qemu-devel] [PATCH 22/23] target-sparc: Fall through from not-taken trap X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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) {