From patchwork Mon Jun 5 16:52:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9767007 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3DEFA60353 for ; Mon, 5 Jun 2017 17:12:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E8AD27CF9 for ; Mon, 5 Jun 2017 17:12:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1366027F8F; Mon, 5 Jun 2017 17:12:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9420827CF9 for ; Mon, 5 Jun 2017 17:12:36 +0000 (UTC) Received: from localhost ([::1]:34443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHvYR-00065g-Mt for patchwork-qemu-devel@patchwork.kernel.org; Mon, 05 Jun 2017 13:12:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHvFh-0004sL-0e for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:53:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHvFg-00046b-1Y for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:53:13 -0400 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:35066) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHvFf-00046X-TE for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:53:11 -0400 Received: by mail-qt0-x243.google.com with SMTP id x58so9855281qtc.2 for ; Mon, 05 Jun 2017 09:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=XBR+bGEDOt6mOU+v4qTgDjJAa8lYwJHyiS6dzTwaico=; b=ZOXgam1LcUCGpTmAYUevNVVfnRjiomHryIprKclFS1AbE8A2Zh+EJUEH1FJlX/ml0t WQZVsdvCE1LEZav6txB2/SJdGi/Dro2Ad90wNcFeyaX1EjJrT0XkeJik+mOvxz2bL/e7 AvWmV6RcgdV9N/0q7SswYBEJ6/gkPxI9+0P573Bl4lzoFZKk/wP+xb0TEy/g9snOmR2h LkNwH9/v0L9rZ1o/kbgZpY1TphiIanPpBGAcQL9ZwmPEaJ1G93JZahJnTarMWmZn2yoH yOHeS4j1qkjPwk8CaPIdsZRxrXfkYV3f2IFg1GT5uBZSaAD2aK7ekEEhgfEno2ckxqVq t3Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=XBR+bGEDOt6mOU+v4qTgDjJAa8lYwJHyiS6dzTwaico=; b=YEnv7JVWg1lWD0rheUCD8ZLbbzglnPC2oBSiaxa9zoNrOgo5sIkD/MzGxZf3AO+H60 ld9+8/vmLaaYxYciO4XEzFpcVS5l0D7Zrkwlewn2eyox6sM0O0JNrPOiY6176DMuVIUi WSOYq79TlpGAOkKqEmbDYBX81og3G+SucKQCtd/EoMANUHPQBBlocVrgkpPpOxwd8fn+ zEjntCwxXRvPAVzYVJC/XkFpMN1cSHD1xBT1KZCGWlXt41adpGyNlHYu11PWCKtkDOEL iZ56qRJ9Tf7tk8Gd6B8Muk4KAfKttSMjoFzDDHp06iTijYYhI8T6OZakkag4IUcbHimR 108g== X-Gm-Message-State: AKS2vOxI6AccNr4Sy0zgaY3HX6XnX0asJl0YY/3QGrCfc5GWMClMk2p6 KvCFsR1DsMyOcEo8GqE= X-Received: by 10.55.149.70 with SMTP id x67mr23906626qkd.236.1496681591129; Mon, 05 Jun 2017 09:53:11 -0700 (PDT) Received: from bigtime.twiddle.net.com ([2602:47:d954:1500:5e51:4fff:fe40:9c64]) by smtp.gmail.com with ESMTPSA id c6sm1637044qtb.56.2017.06.05.09.53.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jun 2017 09:53:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 5 Jun 2017 09:52:33 -0700 Message-Id: <20170605165233.4135-27-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170605165233.4135-1-rth@twiddle.net> References: <20170605165233.4135-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PULL 26/26] target/alpha: Use goto_tb for fallthru between TBs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Richard Henderson --- target/alpha/translate.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 4523c4c..7c45ae3 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -89,6 +89,9 @@ typedef enum { updated the PC for the next instruction to be executed. */ EXIT_PC_STALE, + /* We are exiting the TB due to page crossing or space constraints. */ + EXIT_FALLTHRU, + /* We are ending the TB with a noreturn function call, e.g. longjmp. No following code will be executed. */ EXIT_NORETURN, @@ -2984,7 +2987,7 @@ void gen_intermediate_code(CPUAlphaState *env, struct TranslationBlock *tb) || num_insns >= max_insns || singlestep || ctx.singlestep_enabled)) { - ret = EXIT_PC_STALE; + ret = EXIT_FALLTHRU; } } while (ret == NO_EXIT); @@ -2996,6 +2999,13 @@ void gen_intermediate_code(CPUAlphaState *env, struct TranslationBlock *tb) case EXIT_GOTO_TB: case EXIT_NORETURN: break; + case EXIT_FALLTHRU: + if (use_goto_tb(&ctx, ctx.pc)) { + tcg_gen_goto_tb(0); + tcg_gen_movi_i64(cpu_pc, ctx.pc); + tcg_gen_exit_tb((uintptr_t)ctx.tb); + } + /* FALLTHRU */ case EXIT_PC_STALE: tcg_gen_movi_i64(cpu_pc, ctx.pc); /* FALLTHRU */ @@ -3007,7 +3017,7 @@ void gen_intermediate_code(CPUAlphaState *env, struct TranslationBlock *tb) } break; default: - abort(); + g_assert_not_reached(); } gen_tb_end(tb, num_insns);