From nobody Wed Feb 11 05:58:34 2026 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1625764314; cv=none; d=zohomail.com; s=zohoarc; b=K3M2cjQLKk1AwmN8ThlF4RQ/xtad9XcMAcD5NvFsC44JPEcbXHijrlvsTzQKB9nFgnQUOCfgJxsszXRWRbj0bdghiZRi6b4IxVQKHI5v+Gf7QulWa+5Ch9ZJcaju7CcAM5a6Hq1pBmcwsEF4DZz8fkWd6LpbMajTA2fDnXVEPIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625764314; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wSdjr/g6ebURffabwRVQ49phX7WVAZtuCPeYDJ3HffQ=; b=Icyilx6tnc1sWY0EGG5N3EWxPeRTiag0Kre1cyTjgrtuQ8Zjz5eegPAT8sdtIDJIMEes0BMY51PieO/6FQ7sxfUJNEyeLV5fZ6LfBEhnRYBz+XFZ93x8MopXyb68wqzwQsjJ+ycaeyImsSV/Pim7vhffYoTnEOot9BHRcsppRzc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16257643145781013.8085697712286; Thu, 8 Jul 2021 10:11:54 -0700 (PDT) Received: from localhost ([::1]:43188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XZ3-0002uq-GL for importer2@patchew.org; Thu, 08 Jul 2021 13:11:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5C-0001XM-Ff for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:02 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:39849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X53-00089w-Hk for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:02 -0400 Received: by mail-pg1-x529.google.com with SMTP id a2so6596333pgi.6 for ; Thu, 08 Jul 2021 09:40:53 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wSdjr/g6ebURffabwRVQ49phX7WVAZtuCPeYDJ3HffQ=; b=ng0PfcGHdqzM5NoXu6ao5ZApl6JorEieP90ngJ2UgWItpRAgZAqk11xUqvok1H/KBr jcnWbemeNj9ZLv/4Akt70PgfhUxFcQDKSfIQ/LRjXyq80USiYA/snkzoA4D/ajdvxBJn Azm+JTf6r/daNXiWn4UdQkvIjGTIFbXJY0+E1LyBqpVc0YbUAenNSMH0Cu4Fxop/wd8C PAN74WefLZ9+9EIrbZKYbWKhQDsoidki7q5m4OgHN6lbrtm6R6M5rIcLlTPeenjOvAFP sYOiF15h3F2Ndo1haw6/WcOs4eF7X4/SiDoV0Hd3L6mBqD+nDssOiVKELqLRtGG4KAnS 26PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wSdjr/g6ebURffabwRVQ49phX7WVAZtuCPeYDJ3HffQ=; b=aEsFIIftf3hFPBRPC1sqwENNOWfkqwtXyTkgxFj/Z1/pb0Wbm1vqqpKy86xfmFg+0W YxEdqRBx/8wg1nOIdJsdnt3B3sflfDYd6BKE1dPkYRrJeZcm6UX5XYwZrvW+8LBnqfTx rrepa84Y9aWcsLslRV7LFOo2Xuv9I+3/1S86ZqjyUKUu0uf/jUp6sSnZy8GcbPLiQ2ke HIcVwhFU3smdBla4AomPIps/PIo2i79ilw7vQOhqjWwtVxUK7lGtra+Fl4uju44sJf5J GtJXjEs1dxAJW/e+aHCu4fDfyw+mEMGh//zwUhkI7L9VYanI+Q7BPnVHWKNhOkJ5pT+a /7Iw== X-Gm-Message-State: AOAM533qAiEIUBpAC7ZfmkmckIJA5wxf+u9rZ/r9YSvgd1QkibSoNXj/ I06x7arEucbLFBEh/e1eGtoWGTCIzwOsOA== X-Google-Smtp-Source: ABdhPJxp/8cy4S/6NxZbp/bV38OqsOutH1sjnkSZjxO41zlipgXkL3DYsVSyf1UzXGr6Lex/K/nJhg== X-Received: by 2002:a63:5156:: with SMTP id r22mr33647059pgl.264.1625762452094; Thu, 08 Jul 2021 09:40:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 02/28] target/alpha: Remove use_exit_tb Date: Thu, 8 Jul 2021 09:40:24 -0700 Message-Id: <20210708164050.711967-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x529.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: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1625764315156100001 Content-Type: text/plain; charset="utf-8" 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/alpha/translate.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) 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 ad= dr) #endif } =20 -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; } --=20 2.25.1