From patchwork Tue Dec 24 20:05:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 853256 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp4083263wrq; Tue, 24 Dec 2024 12:13:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUceWgTKJofsd48ByGreiCltY4zsI9kltABeaG4E2/Pbj1oAoirc9d/4gTtGFt8K/eu7FBWjA==@linaro.org X-Google-Smtp-Source: AGHT+IGw1dgsL5jBdbtWbU2wvrbOVFN3wsLxzonrsnlJ9/T7+2MSsldgUf3vwfs+jm+adthkJphM X-Received: by 2002:a05:620a:8006:b0:7b6:e9ba:2853 with SMTP id af79cd13be357-7b9ba7bc17amr3315595885a.35.1735071180451; Tue, 24 Dec 2024 12:13:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735071180; cv=none; d=google.com; s=arc-20240605; b=Nrq8zvHjw9rCsUBZNoZCETSy4jgVqTB/kQ++o34crsERy2U/09XzFOcDc151YvpQDf +GrRAHCBUDFliIgivHRSVVxuXgbDj1fLqPa5JXy7Y1OWHs4NxpPvbdkgxuJWGZPOwuxt eTwGwFpACim9h3JkZtcm1pg/CogOjZ1zEX7tLTreemT6qaaDL5ISGrEagavNIdOPWlUP PdPmnfPT3t8Bt5HHqfAHMqRatWBlfeYyix8TIjYL3q6hD9Iue/06UCvpulON4PkutGf9 3tY4zlTVJ+zxGnFUOhhPsMZ6g0I03cYP764GrYamjEfaSyuMFqot5fb+MKT90pWZvLnn zr4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=DNZINX2but2Pfb8ZOCVoSmAmmZqPR58yrma436JYpx8=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=a6q1jF0pL/qGElqlr+WklWMQt52QeMFa8hCqauIxP3UbImmBfuDKfk7Y1TDDLfV44l zpcDfgfLeva+m30xNH8eHk6iqjgt9CpGwanMYJoXz3YntyLi5UvmcxvgUrTDE4l9mFbN +JrNRxazyKT3EsXnY2N4rMjUX7p/c7SKUeuO5HI8DP4MfEexFViJHWsstvYiZ/olZ0gb jyomqyGN0EY9GRjcFoFNfkXkDDlUsefqK6Wg4tf/zdw0LPOuCFrVuCTuXgBzLW/Np5t+ 1lgC3K7NbNO52zV9BhoJ/dC1h28eEouD98MIUwP6QSSc1gLVu9H/15VNx+rc3WKFUyUD ILhA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KwSRT+Kc; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac4f2904si1386087685a.528.2024.12.24.12.13.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Dec 2024 12:13:00 -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=pass header.i=@linaro.org header.s=google header.b=KwSRT+Kc; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQBDm-0008QL-Dh; Tue, 24 Dec 2024 15:09:38 -0500 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 1tQBDV-0006uA-Gb for qemu-devel@nongnu.org; Tue, 24 Dec 2024 15:09:21 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQBDT-0002yF-I8 for qemu-devel@nongnu.org; Tue, 24 Dec 2024 15:09:21 -0500 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-2161eb94cceso39855885ad.2 for ; Tue, 24 Dec 2024 12:09:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735070958; x=1735675758; 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=DNZINX2but2Pfb8ZOCVoSmAmmZqPR58yrma436JYpx8=; b=KwSRT+KcH7MgyHOtDyq5XmPTzoqcNKuvSAi7VuB/OwOW+Fmk94CwgyOddiCGKFDXbh JUsQaPT3aL64sKAvplEBtMeCc94UriLAxNDD74dYmLy7hRtxNFh/triM12/7l42Gg9Y9 2dU9jb8s8Ce84DmmwvbxD/GFDRJpletHZWukKPIWvGtyJBTY/OfK+pwiqyeu4Qibzpsj p+m/yOPppOrQVWLigq/V70qTZOJy/FCs9dRGe19JvDM2w0owkfgCBYLTMJYC01pAT/yg gC9qpVIm8d4cMYlLTu3pl2y0J53I+2ySj1kAH8apr3fOL61cFlxVCNgoT0nqF6M8UteQ AgJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735070958; x=1735675758; 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=DNZINX2but2Pfb8ZOCVoSmAmmZqPR58yrma436JYpx8=; b=LFODBmFeAqj178tIPQ6C3VxJbL+gJgetL111SzoB2PEXlAlpy00TGV9lDpe3rkQjlG A1tGpPnYR4zRtkIQNO/ocZZ4lmwVeRe3jebk5GmXBWjRzbjhDb/K22SIn1Xx8+ekVezf 9OaZ2rGsOpeeE37/JF+AHYff2gJPBFU5q3D4U9g4CTsHZBjNLe7/C3M33MrlZ2tgOkgO SwUjU8OxZjgLaaclp+t6riXYzTy1Bz2OB8x3X8sexatqE7X1Xnd4xYoZzYT5k+9DcN21 co6dvXL87fDS+0ZPm5hDtAvzoJGT4kSChrBhlDJXd164OyF0dvPtXgWMI+5HKnc/uvDf eIEQ== X-Gm-Message-State: AOJu0YwerBEHdhFyuTeDk5hMvaiTWiw4Mbe6hmRjgJvRNrfGlbGhWQCY 217DNy4gZvZA7FEKbW5tA0/WhRZfuBhNnisiPILoNw6wHFENmAKuyD8NRmDA39fd3c3+NDGWbG8 9nU8= X-Gm-Gg: ASbGncsdSPNX4GPPJLyBBPWhQZZ4tf/gxMbzKwfzF0Uzkft15vBw1NKM8CQRERruQi8 C6qAvy6b/xK/PRq9O2X3rx8XoXSa/bYfYG+CtbeMiWfRPITVbjGGyBtJX8EZqCZFvskAgIVDAvv KpAaTh606MxFmleMrjsGxNKmV2gZfSGevJ3SdzBcz6c4Gnv5QMvZb5P+tu1Zx6PQ8W5aqwCKVq/ Qfrtp4ChnSt7WAQzWZSPM3DBhXqQh1OU4KjcL0/1n6x3+oSHQ/t7MZ20/FqNBGEjjexlAzjmR/+ Tp5QWbGQHbXz2qusTN+YW8q3Sw== X-Received: by 2002:a05:6a00:2449:b0:728:e906:e45a with SMTP id d2e1a72fcca58-72abdecdbfdmr28215787b3a.24.1735070957893; Tue, 24 Dec 2024 12:09:17 -0800 (PST) Received: from stoup.. (syn-156-019-246-023.biz.spectrum.com. [156.19.246.23]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8309acsm10033521b3a.45.2024.12.24.12.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2024 12:09:17 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 58/72] softfloat: Remove float_muladd_halve_result Date: Tue, 24 Dec 2024 12:05:07 -0800 Message-ID: <20241224200521.310066-59-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241224200521.310066-1-richard.henderson@linaro.org> References: <20241224200521.310066-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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.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 All uses have been convered to float*_muladd_scalbn. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/fpu/softfloat.h | 3 --- fpu/softfloat.c | 6 ------ fpu/softfloat-parts.c.inc | 4 ---- 3 files changed, 13 deletions(-) diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index c34ce0477d..aa69aecfb0 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -120,14 +120,11 @@ bfloat16 bfloat16_squash_input_denormal(bfloat16 a, float_status *status); | Using these differs from negating an input or output before calling | the muladd function in that this means that a NaN doesn't have its | sign bit inverted before it is propagated. -| We also support halving the result before rounding, as a special -| case to support the ARM fused-sqrt-step instruction FRSQRTS. *----------------------------------------------------------------------------*/ enum { float_muladd_negate_c = 1, float_muladd_negate_product = 2, float_muladd_negate_result = 4, - float_muladd_halve_result = 8, }; /*---------------------------------------------------------------------------- diff --git a/fpu/softfloat.c b/fpu/softfloat.c index b5936cc0f8..6967fb5c9f 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -2274,9 +2274,6 @@ float32_muladd(float32 xa, float32 xb, float32 xc, int flags, float_status *s) if (unlikely(!can_use_fpu(s))) { goto soft; } - if (unlikely(flags & float_muladd_halve_result)) { - goto soft; - } float32_input_flush3(&ua.s, &ub.s, &uc.s, s); if (unlikely(!f32_is_zon3(ua, ub, uc))) { @@ -2345,9 +2342,6 @@ float64_muladd(float64 xa, float64 xb, float64 xc, int flags, float_status *s) if (unlikely(!can_use_fpu(s))) { goto soft; } - if (unlikely(flags & float_muladd_halve_result)) { - goto soft; - } float64_input_flush3(&ua.s, &ub.s, &uc.s, s); if (unlikely(!f64_is_zon3(ua, ub, uc))) { diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc index 4a62d6ca24..a724f317c5 100644 --- a/fpu/softfloat-parts.c.inc +++ b/fpu/softfloat-parts.c.inc @@ -653,10 +653,6 @@ static FloatPartsN *partsN(muladd_scalbn)(FloatPartsN *a, FloatPartsN *b, a->exp = p_widen.exp; return_normal: - /* TODO: Replace all use of float_muladd_halve_result with scale. */ - if (flags & float_muladd_halve_result) { - a->exp -= 1; - } a->exp += scale; finish_sign: if (flags & float_muladd_negate_result) {