From patchwork Fri Nov 19 16:04:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 519261 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp2737510imj; Fri, 19 Nov 2021 08:21:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4AnwlkWj2RWBQCwqofxfcLXHGLXAaVQmAuPBPor/V6g9AUXgBCYmXAjfXUgLDqmoJmuTj X-Received: by 2002:ab0:1d10:: with SMTP id j16mr51811670uak.40.1637338879693; Fri, 19 Nov 2021 08:21:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637338879; cv=none; d=google.com; s=arc-20160816; b=NMNEgKnHjiD84rVi+2KFwwPGeUXzOsrZaxginusSNcPmg+VEx+VngVjcqDOWmfZPKO Wctcn4uWL3WWLXWCl8dEABZyztFjtHEMeIPGquxK6Innsaft8TNKJ8s85XRjll+kyQYw 0mXw9f5NryZkRr9bH1DX/TEZQHF5K2vQqmCYHDq+kIxOidWVDLgX/TSggFGS4KMXTC0+ +bBC+KBJPZzHVVheZ0IDG5CcUCTNF0T8W3Xf5piUNctCP5dbc4fm+DzIk6ZA0r2eAUxl ZY3qS1gbuOej+4NHpjYV4R3/4JItDcYOKnaFv5iR6TrNv5CJoaDhWV0Pfqn9lTB9b6We lpKA== 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=tGtNLXcWOvrcTLji2ClQOvIyc/zLp7dG4I24EvpNZ/Q=; b=tteMNvYLY+DC21GH/H+L/woJuRs3WnkltGO/p+tkCLcoUemkP7Lam4vjTYq9mHMb7j JR5Ij9jvQX9w2QzvzTNngHJdDQCFBtej9LTfAzBJ8VPpHgC+b+nfM36Ymwae8DmjvQDS z2cEPtpVAgwWyomaDHM691McxeYOKsN+FvAW12aJWunKZHyd3t35PxQPdaksQHUqTi9M ZhibxR+m22XuA2mTvX0AMYZ1xnRV9GthpT6bgtBThhdUm6CGVSjcbzAc/AMF+/nRwLgx umHy+nQMvrSw16vy4s6x6069BW6qwc3C1OEBgf1yew+8/AQhwo/EdYTagS0Vds6XhQth v4DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jC7nb+5F; 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=fail (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 ba33si273994vkb.56.2021.11.19.08.21.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Nov 2021 08:21:19 -0800 (PST) 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=fail header.i=@linaro.org header.s=google header.b=jC7nb+5F; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo6db-00089r-5c for patch@linaro.org; Fri, 19 Nov 2021 11:21:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo6Ok-0005rs-JX for qemu-devel@nongnu.org; Fri, 19 Nov 2021 11:05:58 -0500 Received: from [2a00:1450:4864:20::32e] (port=36646 helo=mail-wm1-x32e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo6Oi-0004MN-T3 for qemu-devel@nongnu.org; Fri, 19 Nov 2021 11:05:58 -0500 Received: by mail-wm1-x32e.google.com with SMTP id i8-20020a7bc948000000b0030db7b70b6bso10873846wml.1 for ; Fri, 19 Nov 2021 08:05:56 -0800 (PST) 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=tGtNLXcWOvrcTLji2ClQOvIyc/zLp7dG4I24EvpNZ/Q=; b=jC7nb+5FC5fZCgAlT//OA8cuOEAuciivUVE/n3mzG18iTI71hmIJLHnOByt2sB4D3Y tHzPsisVcq9SE4xhkL4RJW8ta+s53miqa43F6ZuZXYDYTbvsP4sGGnUaxzpryCOVwGER sWkS7vBCSMiFEmnx53OXF+slSuox+pBlYuxwpGajRNDfZ2k+Uky8FBl7Drkg4im9FsuN yxstZlPaIXFdh6seq/cR1U18MGarMvyqDGkaBmcR2Ucf1QBDatpAvnpkDYvkuPfRchDz FxhMvDtdllGfnWYan7AtttARSDxf7Rag79ZXa3PW+besQMsMYCz4WiobEY+pxTG1q7V6 s+Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tGtNLXcWOvrcTLji2ClQOvIyc/zLp7dG4I24EvpNZ/Q=; b=lziIFY+utlKmcI3BgeomylAAEPnFxXbbEpLbtvRVm13dLxS2xosmhVYiLN+YSwJQrQ zmecZbvXklRtKA7SYt7YSqTQUqe8OTqQ6nTuvv/gJzMXZVgydFGuBtxFMioZgmqxEENS UlVNlT7RO7vMEYAuALkEWoXfAk7Fr6pm9oK3HEXWNI71gudQNBQgDumcqbsdhHqCIKdF M6dkTiSdQXpUDzyLZYUy1tz2XDzCxcgG++GfhxIZnJ7YAt8l1hMERooScVTWbe0YY79J Ahbh5bUqUrApC8vGQzx6eJXxTkn70GlPyngvTvcZ3zyF7FXOlve17M69MGcqXJvS5+No aQRA== X-Gm-Message-State: AOAM533GKDn7LCh3se0ya3YzqIKwuS2TCsBBIaj3LycPpIyNCMWbs/+Z yTw1/G3pfhMPrvUP0izwpuTbhK7Tg5YRaFAwwb0= X-Received: by 2002:a05:600c:1e06:: with SMTP id ay6mr978406wmb.64.1637337955606; Fri, 19 Nov 2021 08:05:55 -0800 (PST) Received: from localhost.localdomain (165.red-37-158-79.dynamicip.rima-tde.net. [37.158.79.165]) by smtp.gmail.com with ESMTPSA id q84sm14044877wme.3.2021.11.19.08.05.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 08:05:55 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 20/35] target/ppc: Do not call do_float_check_status from do_fmadd Date: Fri, 19 Nov 2021 17:04:47 +0100 Message-Id: <20211119160502.17432-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119160502.17432-1-richard.henderson@linaro.org> References: <20211119160502.17432-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: qemu-ppc@nongnu.org, danielhb413@gmail.com, alex.bennee@linaro.org, clg@kaod.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We will process flags other than in valid in helper_float_check_status, which is invoked after the writeback to FRT. Fixes a bug in which FRT is not written when OE/UE/XE are enabled. Signed-off-by: Richard Henderson --- target/ppc/fpu_helper.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index d2a7bf5e63..e0c35a3977 100644 --- a/target/ppc/fpu_helper.c +++ b/target/ppc/fpu_helper.c @@ -651,11 +651,8 @@ static float64 do_fmadd(CPUPPCState *env, float64 a, float64 b, float64 ret = float64_muladd(a, b, c, madd_flags, &env->fp_status); int flags = get_float_exception_flags(&env->fp_status); - if (flags) { - if (flags & float_flag_invalid) { - float_invalid_op_madd(env, flags, 1, retaddr); - } - do_float_check_status(env, retaddr); + if (unlikely(flags & float_flag_invalid)) { + float_invalid_op_madd(env, flags, 1, retaddr); } return ret; }