From patchwork Wed Jun 30 18:32:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468718 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp610590jao; Wed, 30 Jun 2021 11:37:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGIeYjgdKagpEhWArIn7VFTHPcEKq5CqmnVdSP/w0DG1QQTsSCYgUtW6kNp7MsCGz4T7Fp X-Received: by 2002:a9f:2f14:: with SMTP id x20mr22882459uaj.104.1625078275949; Wed, 30 Jun 2021 11:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078275; cv=none; d=google.com; s=arc-20160816; b=JfEvGfvm9ZVVydTI3LcTBMSsZ/yIKoQOdQULlQ04DFiIy1CnMA9nSNqAbr/6AnvNBX XOAVtZi85QwvRIDshYzhDEpHopenfsaeRSjYEaAn86i3b1p3/+znm5LbVmGR22kDwUe5 4K7qaXnRQHFhF7vzEuuDHG2JhRMTp8nLV8rdC6PdvFQDBZoAUKoyreSW1XmjimedTO// mv/F4WlTbcySxdC5+bjVu9o1S3sHEDRma8noEl6MTyR0Mc2G61EmMjdGY7SySOTtIkeW ei0dGQbWSDKTt5lVz3Rc5hBAEyavyIFUq0o3vqrLGA312/mk2etWPuRMIKoamnpcfFaA nlfQ== 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=3aENiAfNt4e6plWtqF3mZo/s7tnSV/nuj/JuhYL6FAk=; b=fZw8IAkl/19UE5mpKxKOk5m3Puv3P8H+8VwozlOTOkgPtXTaNGy70n4o6gZ/7SyC/R foSDlkNlFja5wyVxRw0VqR2SCoqxemgNMW+2WqYpSbLp0Z6DwbR9xaCcz8vOXxKjqdg1 p5dSzF9o7m7MUiG+PO57G9kTP80PT3KniAdOSssRTcGoeYFfQQ6RkPBj1Uwbx8uHYgmR 3WKbhx8jHjYgjyunxPEBY7u5NpuU9IUndBCd3xaiK8fQSFhwGXPnKRdWtnzilIZmOciZ LNsgpQw1HjQIEdvr+kGNZzHdm5IHuV+bVj4h+MaXo71H9OnV61LMAJTWDjEjfPQOrZku j9jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ATtaXdMX; 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 y26si16047264vsj.142.2021.06.30.11.37.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:37:55 -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=ATtaXdMX; 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]:45160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf5v-0002c2-Ar for patch@linaro.org; Wed, 30 Jun 2021 14:37:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0j-00055R-Ex for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:44751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0g-0001xy-FI for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: by mail-pf1-x42c.google.com with SMTP id g21so3293517pfc.11 for ; Wed, 30 Jun 2021 11:32:30 -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=3aENiAfNt4e6plWtqF3mZo/s7tnSV/nuj/JuhYL6FAk=; b=ATtaXdMXnhF5nQIO17QxLhyrN5NbccW8YtyBbOw/u2/7eJSP7qonNirtNNNltd2ChL iEIXR0exj9zSh638oocrajTwMEvQngr6BZ5ksdfcO/1wktm87Y2IiFq4yXCQFbNBcdPo P2cAdGGTWOraR9ifmssxIvWkpugFyhbAZpXKJzYXZlKQDgp8Cvorb5SP3+rrp7qRWEsh pPthfkjQJS4q++N9VUyfhZ7UJGU73W12xbc3vNJsClbpcxn1EC5p7OI3pbDNA3ZtWMoV uRx2qSFVJy7oVUG2usVVOozC534i4I/rudZu4ARE6lyVd1HYrs3WRDAiHhzcN7olYv26 sadg== 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=3aENiAfNt4e6plWtqF3mZo/s7tnSV/nuj/JuhYL6FAk=; b=biaGbIdgWhxifB11pHkpCLtXCEGprkXIPrEwZ0LJ/5/svN/vuXxAMAwsuAeSovi6xY IiefAGRg+NUJBnNIG+pFWPT4tUirgWw2e17WZHi+xNdAbqsIp9LeQHUmM8kWXgvaoBgp d4tW1Xv9tuPtZCpVLLlQr29MIWJL0xVD0Z8LIkD1VflmiWF9ONwyfCpziC/7plVYTMx1 wFk8EZJadjmNoL7yBah8l2njP/HPs1ydXA4rXdiGPuBKTV0vnz+MkSsW6x4HJ2jYeWZk Y5+XVyRbAfrrt3V7R29XJDKgSV0VGAa1WpkJ3uOMEc3CethYX4sH/c2XTekgGxOgtElC 6DsA== X-Gm-Message-State: AOAM530mN14cAia3/DjW3HP4BTevXEqqbRgcod8fEJzSZq8enXk/il1c pP66tikxSdBo3Tinp1XyKr/+CY5CCxmnoA== X-Received: by 2002:a05:6a00:882:b029:30d:cd4e:79f with SMTP id q2-20020a056a000882b029030dcd4e079fmr12899320pfj.75.1625077949212; Wed, 30 Jun 2021 11:32:29 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 02/28] target/alpha: Remove use_exit_tb Date: Wed, 30 Jun 2021 11:32:00 -0700 Message-Id: <20210630183226.3290849-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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 Reviewed-by: Peter Maydell diff --git a/target/alpha/translate.c b/target/alpha/translate.c index f2922f5f8c..aaedf78116 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); @@ -3095,7 +3084,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; }