From patchwork Wed May 29 10:54:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 799830 Delivered-To: patch@linaro.org Received: by 2002:adf:e110:0:b0:35b:5a80:51b4 with SMTP id t16csp667840wrz; Wed, 29 May 2024 03:56:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVRbyHUtqWHwdmEWe54YNCagBlmvCEg5McPeZT/W1krjioD/sdUlCKfjRQiO789kf1GfY9K6Y/jC+teghv/VdWV X-Google-Smtp-Source: AGHT+IER+JK8UO0JSnTzWR8EeppTIXU+W+j20AxGqHtv/Aql4OIu/Mbb2npldV97ndCg2e6DUZGE X-Received: by 2002:a05:620a:1009:b0:792:b0ad:eaeb with SMTP id af79cd13be357-794ab05cf02mr1489804685a.5.1716980182874; Wed, 29 May 2024 03:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716980182; cv=none; d=google.com; s=arc-20160816; b=xaFNCazg07RQ2xE7ZMERc1r1YrUu29NNj1FMRZdeuLqnOM4TFiFeEDNFVzJrvq19ur 7iwEnP7ZP0job7pPnUcAySiPveJVyKpl9Vt8Qn5RF3UWXyb3YUCJ2BT+XPfUNphzSis2 wXB2hGZPRa4Ui55y2Up5yqt0T2r53bzQhAj6kCzvGtpGCY/a0fmmiVH2QpxKHOZaJY/b FHI9Qqdqfo4EMn7Hp5ReCi+b2B5tMD5Vg3+xKVHl0T7MhAxG0zgTMU4yeH6Gz7P7pGyu //8/93fD4Hrje+ObE8rg8zlm8NjWW6aq0atzWJhYaHYABJuqwPVOhINrSl+15F9fNrNZ vlww== 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:cc:to :from:dkim-signature; bh=nkKDc76J51Qy7WIb1m+w4mnGxgDf9WFrHs7jMDtsBg8=; fh=mirsU+FllKKdtOtA9rOyM74aZb5Bur6l813uj1uIvTk=; b=ygJ3MVtzSbNL0azWzWmq+SJGTR1+lRk4rm17lrOCj6+IqIZHlhcVMzsJiMajFKCHaI f+QLJPr1DRAzfjYTM3WFWV30GgE8XWCj8BJvkruc/t4G2UWsnBy5Zg71uyP9WCTbdLi1 Hy5vrevqDWichK8DsB2FlHLxrsivRaWLCPtGPuTzZ2hZCc+9xnzT8NdQF1UCR/y8hT9b IEunbzcORY7eWul2xT/Zgrmvemv/pF1GSV86f6OvuR7v/ldaGoa1Q0YtHsxfQ9LiOXPB zZipb29xgwnC2fxBVKA8E8TFOHrazetmXIGD+i0aDQvnjLnHo9UkbYXjv6CIxXWLBrqZ DNdQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FKa7J5Im; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-794abd18171si1225205985a.262.2024.05.29.03.56.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 May 2024 03:56:22 -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=@redhat.com header.s=mimecast20190719 header.b=FKa7J5Im; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCGxu-0004lR-MF; Wed, 29 May 2024 06:55:30 -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 1sCGxs-0004jH-Hr for qemu-devel@nongnu.org; Wed, 29 May 2024 06:55:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sCGxq-0003II-PK for qemu-devel@nongnu.org; Wed, 29 May 2024 06:55:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716980126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nkKDc76J51Qy7WIb1m+w4mnGxgDf9WFrHs7jMDtsBg8=; b=FKa7J5ImAFYBz21l8SmAQ6mJGjwo8sZrb6DvsvmpUTGRmCK5CJd1nhBpig/N/DY2UaHBsm 3YOh10Ps2qyDWfjfPu5AOAwbR/6Y2SsCBPxKnKqMjd9sS4LZjv5M8XQSsClk7KOHhX/9+G HwEzxKRpUWTu8sOuCPRwxkgXM0Zipo4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-230-k8HMvFfmPwepiMvVr3FH8g-1; Wed, 29 May 2024 06:55:22 -0400 X-MC-Unique: k8HMvFfmPwepiMvVr3FH8g-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6097781227E; Wed, 29 May 2024 10:55:22 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4E71E105480A; Wed, 29 May 2024 10:55:20 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: qemu-s390x@nongnu.org Subject: [PULL 13/22] target/s390x: Adjust check of noreturn in translate_one Date: Wed, 29 May 2024 12:54:45 +0200 Message-ID: <20240529105454.1149225-14-thuth@redhat.com> In-Reply-To: <20240529105454.1149225-1-thuth@redhat.com> References: <20240529105454.1149225-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.036, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson If help_op is not set, ret == DISAS_NEXT. Shift the test up from surrounding help_wout, help_cout to skipping to out, as we do elsewhere in the function. Signed-off-by: Richard Henderson Message-ID: <20240502054417.234340-14-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/translate.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index c9a5a1687e..c81e035dea 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -6341,15 +6341,16 @@ static DisasJumpType translate_one(CPUS390XState *env, DisasContext *s) } if (insn->help_op) { ret = insn->help_op(s, &o); - } - if (ret != DISAS_NORETURN) { - if (insn->help_wout) { - insn->help_wout(s, &o); - } - if (insn->help_cout) { - insn->help_cout(s, &o); + if (ret == DISAS_NORETURN) { + goto out; } } + if (insn->help_wout) { + insn->help_wout(s, &o); + } + if (insn->help_cout) { + insn->help_cout(s, &o); + } /* io should be the last instruction in tb when icount is enabled */ if (unlikely(icount && ret == DISAS_NEXT)) {