From patchwork Wed Jun 30 18:32:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468730 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp618812jao; Wed, 30 Jun 2021 11:49:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkppeIWwWEgezKViLj9QHqc3cudAhNxUd3EVkhaTh3x0PpdEKBtRVmvIQlCDbbHdq8ymzd X-Received: by 2002:a1f:cb05:: with SMTP id b5mr29225947vkg.9.1625078998989; Wed, 30 Jun 2021 11:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078998; cv=none; d=google.com; s=arc-20160816; b=FqF/GXH/wM9m4ChWMeWUakiR6WY7QuvjlgB9+WEokAYazVuRDLUUFWPRbzcAeE5zBS slsXtcibltGud7vlkK5XZGRCjNOucvcBnJ650GpAA6hPpqps62t5yv9Eo8wyEnmkVcHF rKz6cXxsCXtSlFu5g5jYMUK04+ciQYdbxXmB/VtZ2sbWEmeQk2QFEiWOPKhj48lgiqBl 5GgN/md5DxEp1pObaPabjrrX8PSVVFUk4C5bTyKSxUO5Z8bn680SlTyd2PZc+kH9Qbyu zXn2cl10zc5w68KU+rEM/U+QUeAbJsULKRSqbqckjON8wEGnjwfozM3vb/SbQr72s7um uPTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=9rewGNkgTjS5g4OXefHXoaM3PsmWPITsUkhsWrEnLmU=; b=T/d++/2REUT4LXlY9F1haplt/CJxn3yy+rh/+WtQSZUl7UmxVGWpOw0Kuf3atUsClS 3YKFHQj5pnEXoHEoYN+ENydi26seXU0Qs7DUsssxQJ2J5kdS1J9dFz+wiLzJy9fniF/J Y5u4MBx6ApNrVlyt7TrsFNKlKeFMPXvhi4LOWPMLSsFXrEBNYd2ci1m9bpSfOg5cRTeZ 5BhnCHZCFvLCxEy+JGyDTZA/3Ku288MQFzwZLrQU3Ht3xRDLselTtWbdz2IXt3kAuA9w suP47fwFSOdkBQTjVqiHbueZ+6cxTxtptP521DpvIOZPnGMU9NNdqApA7Mp7LWpxu7R2 DRcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uK4HlgFg; 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 x75si14843793vsc.240.2021.06.30.11.49.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:49:58 -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=uK4HlgFg; 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]:46830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfHa-0005vx-BI for patch@linaro.org; Wed, 30 Jun 2021 14:49:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0v-0005dZ-0S for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:45 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:34546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0t-00027P-2q for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:44 -0400 Received: by mail-pg1-x530.google.com with SMTP id a7so3214536pga.1 for ; Wed, 30 Jun 2021 11:32:42 -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=9rewGNkgTjS5g4OXefHXoaM3PsmWPITsUkhsWrEnLmU=; b=uK4HlgFg76DHiAcOgJDyWgRGibhhWJBv6ccDe2cnqFzOjvCiQIPpZm3xUk2xDml5z9 9xYIvituBRhutIUexLuCHB/7glmyCXKCDLeEl7Q/koHwawLxz/chIrupZJqZywIM7cpP ajVytP2E+T21aQhhFVyS/Tm52QnHbg+4GXgvlbS4YvauclAm82E739aVXfga2uoy1IcH V0WdKoO7JFRrHCBeXxcrec3X6xZXPnt2GplAd17raA5Gj/g/My7Hjs+OBmriMPMsRldo Np54yru95EBcz5yfRhbuo9QyPuICu8KwhAz1mXUzQ2LyjOU/87R6wPIuaZWDXnLWOAqM 6PUg== 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=9rewGNkgTjS5g4OXefHXoaM3PsmWPITsUkhsWrEnLmU=; b=dpI2his0u+vhdXfVOSqm1G+RvKjeowsbb9IqwXnMKNx8k7B9OLa3poBNTWTR21gFQr eLNSJmVPuruNkiIQRYMy7IK5Q0XlJgHXRILlHeF5FqAZpEfCELRFzyBrjda3arMu+Cgd jk7u38WS4FH9PCmICiZKKCAEnTF8K12zOdWZgIXzhwnTCxsCUEP+82/AjBzu653/drQm ryvcSaSQo4/FrqR1sOiY7TNssc5Busz1fvthxmDTf2neNodCTM4UK/hnBfUzfsYCcTDa YYPi92nVYQDvAiBqgNzumP1vcrGvlOAEDcx5l1LXNwq1F2QoxZ73L1WgOyUOn96THTgC i5Uw== X-Gm-Message-State: AOAM531zdcN9CVPZYZjP3UU1T9uMtFgQhizoyAa08wot6zUU073hCLlB toLqPcA95n/4QgJhpv3+1vcoEZ2MZj4lQQ== X-Received: by 2002:a65:5302:: with SMTP id m2mr35137862pgq.187.1625077961723; Wed, 30 Jun 2021 11:32:41 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 23/28] target/s390x: Remove use_exit_tb Date: Wed, 30 Jun 2021 11:32:21 -0700 Message-Id: <20210630183226.3290849-24-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::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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: David Hildenbrand 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"). In use_goto_tb, the check for singlestep_enabled is in the generic translator_use_goto_tb. In s390x_tr_tb_stop, the check for singlestep_enabled is in the preceeding do_debug test. Which leaves only FLAG_MASK_PER: fold that test alone into the two callers of use_exit tb. Cc: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/translate.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) -- 2.25.1 Reviewed-by: David Hildenbrand diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 117a890ecd..4742f59ca9 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -685,16 +685,9 @@ static void gen_op_calc_cc(DisasContext *s) set_cc_static(s); } -static bool use_exit_tb(DisasContext *s) -{ - return s->base.singlestep_enabled || - (tb_cflags(s->base.tb) & CF_LAST_IO) || - (s->base.tb->flags & FLAG_MASK_PER); -} - static bool use_goto_tb(DisasContext *s, uint64_t dest) { - if (unlikely(use_exit_tb(s))) { + if (unlikely(s->base.tb->flags & FLAG_MASK_PER)) { return false; } return translator_use_goto_tb(&s->base, dest); @@ -6634,7 +6627,7 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) /* Exit the TB, either by raising a debug exception or by return. */ if (dc->do_debug) { gen_exception(EXCP_DEBUG); - } else if (use_exit_tb(dc) || + } else if ((dc->base.tb->flags & FLAG_MASK_PER) || dc->base.is_jmp == DISAS_PC_STALE_NOCHAIN) { tcg_gen_exit_tb(NULL, 0); } else {