From patchwork Mon Jun 21 01:34:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 464470 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp2112609jao; Sun, 20 Jun 2021 18:38:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVoAKRtRxmuJr6iZ1RvS9+rzrIMCHa8ZWHY+cVe/4fJub30JsefoMVuQ8CY9farDEitdTR X-Received: by 2002:a0c:fa0d:: with SMTP id q13mr17557361qvn.43.1624239500416; Sun, 20 Jun 2021 18:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624239500; cv=none; d=google.com; s=arc-20160816; b=nbeKgnIMwY1Rz4h1nTyITky8kCggbO5713vTA02t7HmkCRi6FiobjuKaiT1YC6RQmc OwsNZAvhND2VGa4ASprAc7OL9Xa8jCCr2yMSUGby9uWebvmUojGkZ5ZUpjSu55/1NLhp 2cjcHyFNiEjVNcpB8X5N/IicXOJtXCbOakwgmhtfq22AB5dkyysmlw6dltxHxu2dkmxO arJjZxJglMKPrgp8Jzqpv7vqctSE+2BX3h3BjNgJjprltS9BJqw23LKI1ENRZOaEk5Zo wVnm3qlmT7z43RHKzUhPpCp6Sl63qwrFE7JwF/VEYUqJnJEVEeATn1R7IBByM32qeHDS MsEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=N8g+aqSIVx1gl+cogu+CC6dpxUuqUQpSlSSilhD6d5A=; b=wzljtAjvwK7JVBEzj6A/cvmRsTD5hWJeZRJhOLsTfWB5QXSRxXxU/sgL3rJoVauUMo JCF4A7FYlR7E2M2b3h3EMCPu8Hwj6y8HRVroDXqKonV/cbUK0w/upg1F3372zANvhK3w 1hWsl7dvZHnYOtdqWA7yBiA5cTxWCJVRabx1LkkHjFQsHheEBI1cRbfYbOmzeP2q4lL8 b7RdnZQA2YI8pX8U3VeyRDA90ZQoGyK1fvq93t9MCMuOdQOwix4ORrA8/8DYv3D0rWCB Xvbu995MNVDYQK4XaZfM2UCA5KQKpk6mu46QM71zqPFBm0Pot2U/iSyYzLWH+uRvBE0O 4RcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LV2ilcqQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f13si13309646qth.235.2021.06.20.18.38.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Jun 2021 18:38:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LV2ilcqQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lv8tH-0000ya-QS for patch@linaro.org; Sun, 20 Jun 2021 21:38:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lv8pq-0003eK-Qb for qemu-devel@nongnu.org; Sun, 20 Jun 2021 21:34:46 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:37756) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lv8pn-00058Z-HV for qemu-devel@nongnu.org; Sun, 20 Jun 2021 21:34:46 -0400 Received: by mail-pg1-x52b.google.com with SMTP id t9so12822723pgn.4 for ; Sun, 20 Jun 2021 18:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=N8g+aqSIVx1gl+cogu+CC6dpxUuqUQpSlSSilhD6d5A=; b=LV2ilcqQXl3yoBtJxClrtrEJZquWSmfBxWuCV63iW3VeP+l+QEkf+w11XgYBBFQjUJ hdKb5hRYfNes4A4CquRGr4FO5eGHUHlm4G/QoZMSvkfCrGjqrFWlMwgZxnLRgrZZX9KO Jg3q6ulSOdYom3xvt21aEA7Iht/4AlOH6HIXzmS/kJgvPjr2LJ4BJwjY0H6/p1quii7O W1JUg7MeUkcj9beoYdUcKg4nxyfA6xY+Ixg27uzqRNzaZ1YxfWkhIkBcvpfWk8pNu+HO Wi35iNJj4bMxbIHQcfUsDH6Za28pRD9OWDMouwAWowF/D5MU7UmqvfrsWDMAySwFk3YB wnLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=N8g+aqSIVx1gl+cogu+CC6dpxUuqUQpSlSSilhD6d5A=; b=bMmYfLv43ppE6MmeAYP632SXujGHtLKwp6J3szkIDzSWygsDXenNiJNEgfJO8MGKfq Xzpr5aFOU5iuWNXlxXqJmagLC9wmAaLjwVuZ3zsYjWGMuC3EeRvmQZNyl0X08L4QXKfK pnz22n/zedoa+fgwI61aqxYD4EQAppQQ2P3zsbnSXYOWByGHjmWlP9Rd3sbkIfX8+wBR sWdmsEg/vlZbfd37LqvaRYVvkkFuZXX0O0eNLehwMUvtJy0x826ld2S13OCGC0DwmfLr 6xhyIubzNmZx2vF4oZRfTIQCKTuTWAmPcyRBduqv8YrPKMoPwqWy8JLNAaWvW44rXdWp 7Apw== X-Gm-Message-State: AOAM531acAAZoiwstC55rhXji3a1GMQY6+aOVdZVKHOY9wUDnoc2wn4T GtfzLB+WllCuTSKa8UKkD/4t9+sRl3azbg== X-Received: by 2002:a62:d447:0:b029:291:19f7:ddcd with SMTP id u7-20020a62d4470000b029029119f7ddcdmr17030953pfl.54.1624239282158; Sun, 20 Jun 2021 18:34:42 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id s27sm1495628pfg.169.2021.06.20.18.34.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Jun 2021 18:34:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 02/26] target/alpha: Remove use_exit_tb Date: Sun, 20 Jun 2021 18:34:15 -0700 Message-Id: <20210621013439.1791385-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210621013439.1791385-1-richard.henderson@linaro.org> References: <20210621013439.1791385-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We have not needed to end a TB for I/O since ba3e7926691 ("icount: clean up cpu_can_io at the entry to the block"). We do not need to use exit_tb for singlestep, which only means generate one insn per TB. Which leaves only singlestep_enabled, which means raise a debug trap after every TB, which does not use exit_tb, which would leave the function mis-named. Signed-off-by: Richard Henderson --- target/alpha/translate.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) -- 2.25.1 diff --git a/target/alpha/translate.c b/target/alpha/translate.c index f454adea5e..70ba4a67c7 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -450,19 +450,8 @@ static bool in_superpage(DisasContext *ctx, int64_t addr) #endif } -static bool use_exit_tb(DisasContext *ctx) -{ - return ((tb_cflags(ctx->base.tb) & CF_LAST_IO) - || ctx->base.singlestep_enabled - || singlestep); -} - static bool use_goto_tb(DisasContext *ctx, uint64_t dest) { - /* Suppress goto_tb in the case of single-steping and IO. */ - if (unlikely(use_exit_tb(ctx))) { - return false; - } #ifndef CONFIG_USER_ONLY /* If the destination is in the superpage, the page perms can't change. */ if (in_superpage(ctx, dest)) { @@ -1271,7 +1260,7 @@ static DisasJumpType gen_call_pal(DisasContext *ctx, int palcode) need the page permissions check. We'll see the existence of the page when we create the TB, and we'll flush all TBs if we change the PAL base register. */ - if (!use_exit_tb(ctx)) { + if (!ctx->base.singlestep_enabled) { tcg_gen_goto_tb(0); tcg_gen_movi_i64(cpu_pc, entry); tcg_gen_exit_tb(ctx->base.tb, 0); @@ -3020,7 +3009,7 @@ static void alpha_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) tcg_gen_movi_i64(cpu_pc, ctx->base.pc_next); /* FALLTHRU */ case DISAS_PC_UPDATED: - if (!use_exit_tb(ctx)) { + if (!ctx->base.singlestep_enabled) { tcg_gen_lookup_and_goto_ptr(); break; }