From patchwork Wed Dec 11 16:19:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 849205 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp416853wry; Wed, 11 Dec 2024 08:27:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVC6o6dvf8bUhV/W2YxBzYa+uf+b8zeUgk9B1ozKxwVzPoUU6sS+XFfu6Nu+5+9qnJEyZdQSA==@linaro.org X-Google-Smtp-Source: AGHT+IFV+zIPKXvlVCT/ME9VRi3C17h0oQWM1UA+K0DH4jEOKocZnR+D6VH+Y0rXjTFnsO78z8Co X-Received: by 2002:a05:6214:627:b0:6d8:893b:2a13 with SMTP id 6a1803df08f44-6d9350678a6mr62598376d6.0.1733934419927; Wed, 11 Dec 2024 08:26:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733934419; cv=none; d=google.com; s=arc-20240605; b=huDZawxCJUCw3QpFgO8TiLdav1v2JuyDGbTgeDioSHt7sJ8aH4cRWMJ35gI0jBmnWz FYVTkG6ncD12fnlrpziDZxbkkgo9kDSMi5zb+szeZIFI35fC1uw1x54Fq5R9GWzjHgy2 9jddTC92PdUT/TFHblf1Wc3gdqTjeqxyb46abMR/ojB4VmVRXHp/wvxEaIysKln2MjnU Dgw/NFN2gQAJ1Gasnfl4by+JvQWLTDjL9JZsLTC+4dnxopsgy20SvqJcnZetwQUSwRP2 LT7LGtsZjwK7C63ge7VqO5UEGHy7rty4XmxgAIp18Ji/wenxlqxn07poTjE93joV0zex AIpQ== 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:to:from :dkim-signature; bh=Ec4PeXlmg7CtR/PXfmSknGAM8RrcTIj+cvTbuOFtEy4=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=b/MdkEvaWurTROzeUh7U7/ArUj7W9ljAtnN+vqntUzZy/RHPpYDkNLt4g/aGbvkXEa 5r1bmowsgoBfEb+Hr15SrqLKSldWwg9TTwuSDZsjXrVLD55SLUA7NuxQih6FB7J0q5Qb 2PsFuMJbD6ARuPPt2wmOAkj9Mr9NNaKfBu8dsg9Vl1uzh/cUuS54DHB8GSPRVkLboQEW FQYG0xsVv1AyC1ivoxPEbydCgJ+UZ5r5/1IpPRmqi/cALQP4RyTlC0w4d9e/22o6DgOz PV0ycssBv1HP1Pu+EeL7YqtXUCQGFyIWygGB3O/CAWqTtXJ7U6t26/pz8wAH8qEPNmNH d/Qw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pSTaD1Nm; 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 6a1803df08f44-6d8fb60d9easi116655456d6.405.2024.12.11.08.26.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Dec 2024 08:26:59 -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=pSTaD1Nm; 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 1tLPRw-0000Er-LM; Wed, 11 Dec 2024 11:20:32 -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 1tLPRs-0000CY-Rr for qemu-devel@nongnu.org; Wed, 11 Dec 2024 11:20:29 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLPRr-0007gb-7s for qemu-devel@nongnu.org; Wed, 11 Dec 2024 11:20:28 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4361a50e337so11078715e9.0 for ; Wed, 11 Dec 2024 08:20:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733934025; x=1734538825; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Ec4PeXlmg7CtR/PXfmSknGAM8RrcTIj+cvTbuOFtEy4=; b=pSTaD1Nm43/gBYTdPld+9u59QRWGv8PjPYCTHMftgKH2i25lolhahKyLQxoU5n7RSq aqaHBrIhX+yCy0Q+WglIHkEQV6tA3gxEI44K7ZJsJp/5zPMjQmsSaj8O1g9gQa6cXHOj zqpaCuKE1Ehon6hiQUNnZHRSEpPRlUn+oS8ocDjWErCIgyCFUY6Luyhp1JpR1Z0uULhV ikntkT5wJo13kqQTSqCDXWiODen6jdPcuBx5zpMhVyOxvQd/JfPHiDMHhrfO9e/KIeGg jYk0oyTZmrb0o6/QQ5B2BGus5emN+gGFcgjE0p6Rex2sGY1dHepgOmZdqJKnjlCazplK uvqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733934025; x=1734538825; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ec4PeXlmg7CtR/PXfmSknGAM8RrcTIj+cvTbuOFtEy4=; b=p5gIK55mq8hj8CKDgNDaRFh2TGTp1iaPtFSkB8gr5xjzZqlggyTNiHS2u2ttXmBTY8 6H3/T0PiG6T9+JRiL/25+T4cY3Yq6mAkmH0GYpXnuz6xv6ATSYX73RlAhxZn6rAXKcox Z8AbJlYzoNg8ByVEcW4XIlhBs3Vxn0IOutCFLHia5//tbFgDxnFD1Lc2viAxM2AUnqkb jnoxDmyhelAi5mTIT0VxApNJdgpkg8zW/q8yCUA/idQRMnKfdYx+dCq75g8ZrBtTtEHQ XsHE4Sc9vBjI9tGcMgAHi3PUrg3HRUArhRPPC4COaSYU41rqUpFA64EwNu/TR2VTVAQF Tthw== X-Gm-Message-State: AOJu0Yz9yZTAGGTaCycBXFqOf0sr+HDJVp2qjYcZYbE+OPtgsKOakN4H ZVAOllpZKeyTFG+9GkSN9pU72oSAg6dbYNmOSxrRDDS4GVDuzqPumyZsZlzjL8lqRhvPnPdt/hp z X-Gm-Gg: ASbGnctWGYqD6efCpcXSj24svRWaTmRxi1WlV8XCty2ddXQuoAyEd03o8DC+jHmP6l/ UOzKswwHckbfzg6gb2FALKbD+y3/PchkTzXIU6FU1Lcnb/ul+q7HS7xrdijfnIobVgSpTo2C+I+ xxW9Qxnrx5XPobKcGaNlxhNJkk4MST8PA/e4CyqHtPmq8Q2HJiU1/nx27OXO22ju1UPID0f4Emp 0Hj+asnWQEZXlWaH8GTgHM72QzJkqqtpNewNHlOGXy8ftPtWM1XvzKR6faR X-Received: by 2002:a05:600c:1c82:b0:434:a04f:2557 with SMTP id 5b1f17b1804b1-4361c396b7cmr27999955e9.4.1733934025481; Wed, 11 Dec 2024 08:20:25 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434f4dfdcdfsm121460595e9.39.2024.12.11.08.20.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 08:20:24 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/72] target/sparc: Set FloatInfZeroNaNRule explicitly Date: Wed, 11 Dec 2024 16:19:06 +0000 Message-Id: <20241211162004.2795499-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241211162004.2795499-1-peter.maydell@linaro.org> References: <20241211162004.2795499-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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 Set the FloatInfZeroNaNRule explicitly for the SPARC target, so we can remove the ifdef from pickNaNMulAdd(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20241202131347.498124-10-peter.maydell@linaro.org --- target/sparc/cpu.c | 2 ++ fpu/softfloat-specialize.c.inc | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index dd7af86de73..61f2d3fbf23 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -814,6 +814,8 @@ static void sparc_cpu_realizefn(DeviceState *dev, Error **errp) * the CPU state struct so it won't get zeroed on reset. */ set_float_2nan_prop_rule(float_2nan_prop_s_ba, &env->fp_status); + /* For inf * 0 + NaN, return the input NaN */ + set_float_infzeronan_rule(float_infzeronan_dnan_never, &env->fp_status); cpu_exec_realizefn(cs, &local_err); if (local_err != NULL) { diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc index db9a466e05b..7e57e85348b 100644 --- a/fpu/softfloat-specialize.c.inc +++ b/fpu/softfloat-specialize.c.inc @@ -489,8 +489,7 @@ static int pickNaNMulAdd(FloatClass a_cls, FloatClass b_cls, FloatClass c_cls, /* * Temporarily fall back to ifdef ladder */ -#if defined(TARGET_SPARC) || \ - defined(TARGET_XTENSA) || defined(TARGET_HPPA) || \ +#if defined(TARGET_XTENSA) || defined(TARGET_HPPA) || \ defined(TARGET_I386) || defined(TARGET_LOONGARCH) /* * For LoongArch systems that conform to IEEE754-2008, the (inf,zero,nan)