From nobody Wed Feb 11 01:08:53 2026 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1714628769; cv=none; d=zohomail.com; s=zohoarc; b=c2aRVniEB3u0H1PZi1lDzHfDjRPm8BbQLQdIOs4JdeL1WCBN1rcUMgCAP2QJGCQGWRedu5rs51//85NV8d1lGu3TWmzCVYmlvup/o0dkHrdxWWQ1RmnJDeWYsRxWAfgkTnK/TQxhT2ta/yUvOXjUidIEgS+XZEy/2n4IiVstxQM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1714628769; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=I2qMHX2+XNKUy8pt8yib4yrbmg7rCMDrLvF6E3jB/iQ=; b=YTLjVUYmTr0HUVv/sRSA9C7lfTwb79k5ZSvNEs+/TXvdE0351vXavJhZg+VReUUB/5W3ozww58gBk1sGSSww+/hsNVvmc+8ifjadwW8QRqr3pTzPMo9MALC/CZlYpKdhRHEpBS5VHFAR0UFESuvjLeVb0kvQQTzGRZURNTmfNQ0= 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+importer=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 1714628769672560.8298911412815; Wed, 1 May 2024 22:46:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2PFX-00009M-Ul; Thu, 02 May 2024 01:44:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2PFM-0008UO-7O for qemu-devel@nongnu.org; Thu, 02 May 2024 01:44:44 -0400 Received: from mail-oa1-x31.google.com ([2001:4860:4864:20::31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2PF4-0002cP-05 for qemu-devel@nongnu.org; Thu, 02 May 2024 01:44:43 -0400 Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-23db0b5dd28so517246fac.2 for ; Wed, 01 May 2024 22:44:25 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id e18-20020a656492000000b006089cf2cde5sm294401pgv.26.2024.05.01.22.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 22:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714628665; x=1715233465; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I2qMHX2+XNKUy8pt8yib4yrbmg7rCMDrLvF6E3jB/iQ=; b=h+nBeluu6wX3LOz0iyFqSzrNqJTCHzUKybYjnzRRRFhDAKfGS837SgvCnh/MTbIhDw aaiAXLhGuENdPBsDzAo2by38sr9AXT9KlF0Y3I2WkC723i2zLdvGlIwFutiLr9pwnY5O wMoyO8v3Kz0qS5IO8DlP9R75JHAMxWjaXZkUir/CCJxfh9/sRAGg4nf+7e+QSIPcDBxP xQ0t5+6ttbyTxtEdSEQsi+8px/6wWHpyXf6KJVd+iDeQLrVymk5octFlL55AlXxVXHyE HKXR5peJ2ZFxIDsyflQdZ4CSifs80pSzFjDHMoeS/3m2qpZ4YpUzhw0HuD4+V2hReKz0 BG0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714628665; x=1715233465; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I2qMHX2+XNKUy8pt8yib4yrbmg7rCMDrLvF6E3jB/iQ=; b=FpFInaLCho2W/urOkLNc2rff167ZjEHh7UjLG7EhSrcURwrNxL7dGD5jbqpS6oRKRT IshBBLZUQ0/WcRFitepbpuJ6qkxxaOlzk2EL0wCytIIy0vqWeVOYHyCBnFRy1o5AtMNw sJdLtFrMyUGuyTFCG1n3yAcl9D4Ec+KEt6/L4LlJ8JZfjbrIC889C7NYgp5+LEU9BxqK N0WXi3gMS1uJNXewKcDYz5hrVQFBTWk5B690bCEBIX/FIZen6+vsg40MZDHJbMkZNDNr OSpT5bg93IrGAs/tqzVFVBlDhOiZF/0IsRWr84NgqWGN73uC7SONxRxckgyr3I10XKqA nDZw== X-Gm-Message-State: AOJu0Yzl22IFkiA7VkO2PGA6BY9UtIdDuusvW85uZC10cpTjsWDhFmBp lfXCIdZRrzL83uAcggLHWpnb5VCCHQ8VtM558Zfi7CmmggXlDtZ+TF5jDmvxrb+g8O8pGeDqrr6 L X-Google-Smtp-Source: AGHT+IFnbxn/+FHcQHKZ2ouEnOWfISkF36KYrciVmgstNqS3pJ4JD5oIIx9j7ALJ+Fp9Lo7a6LVLag== X-Received: by 2002:a05:6870:b629:b0:22e:b2da:af39 with SMTP id cm41-20020a056870b62900b0022eb2daaf39mr1377566oab.47.1714628664753; Wed, 01 May 2024 22:44:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, iii@linux.ibm.com, david@redhat.com, thuth@redhat.com Subject: [PATCH 05/14] target/s390x: Disable conditional branch-to-next for PER Date: Wed, 1 May 2024 22:44:08 -0700 Message-Id: <20240502054417.234340-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240502054417.234340-1-richard.henderson@linaro.org> References: <20240502054417.234340-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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:4860:4864:20::31; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x31.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1714628770286100003 Content-Type: text/plain; charset="utf-8" For PER, we require a conditional call to helper_per_branch for the conditional branch. Fold the remaining optimization into a call to helper_goto_direct, which will take care of the remaining gbea adjustment. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 3622c5c883..c3c821430d 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -1133,13 +1133,13 @@ static DisasJumpType help_branch(DisasContext *s, D= isasCompare *c, goto egress; } if (is_imm) { - if (dest =3D=3D s->pc_tmp) { - /* Branch to next. */ - per_branch(s, true); - ret =3D DISAS_NEXT; - goto egress; - } - if (c->cond =3D=3D TCG_COND_ALWAYS) { + /* + * Do not optimize a conditional branch if PER enabled, because we + * still need a conditional call to helper_per_branch. + */ + if (c->cond =3D=3D TCG_COND_ALWAYS + || (dest =3D=3D s->pc_tmp && + !(s->base.tb->flags & FLAG_MASK_PER_BRANCH))) { ret =3D help_goto_direct(s, dest); goto egress; } --=20 2.34.1