From nobody Sat Nov 23 22:42:23 2024 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=1730805729; cv=none; d=zohomail.com; s=zohoarc; b=fsn9lF2Cbu5eP6nM83SH7dH38EqIIjITZfSLy75hFwvfIhrCmgN3nv8vjLjxNLW0/hAEtzglqGIDhS4EqJxgJiJFDFDWg9hvdyAXrEyshvYGoXSBT9ZW6Lpv/DVm0kwF0Xrib6v9gHUbMq6retec3/+vvAnaKfQREENZfULM/+w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730805729; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=G3DkeEcruqixMHeVvkc/55DZL7+DSMMcCtNLajeMDec=; b=eY0Nb27lDs4nhxQR18UAidcG7Zneim0K8oYrykIwivQszrwvgMR2xAM5bhYHvLLjIBuwBcZXWZIKPOXewCy58JuwbTN1/I+lwISWYm2l8NkfxPFYSbnMZMRew/6mFwweqJt/22okhF+2At89h0Ts88Exec2u0r2Bj1pu+yAKnUY= 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 1730805729737710.3133640015226; Tue, 5 Nov 2024 03:22:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8HbH-0004UC-Pj; Tue, 05 Nov 2024 06:19:55 -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 1t8HbG-0004Td-62 for qemu-devel@nongnu.org; Tue, 05 Nov 2024 06:19:54 -0500 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8HbA-00076M-A2 for qemu-devel@nongnu.org; Tue, 05 Nov 2024 06:19:53 -0500 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-539fe76e802so6123715e87.1 for ; Tue, 05 Nov 2024 03:19:47 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432a3688813sm16354555e9.1.2024.11.05.03.19.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2024 03:19:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730805585; x=1731410385; 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=G3DkeEcruqixMHeVvkc/55DZL7+DSMMcCtNLajeMDec=; b=cn7tNfaB+GSUNWVy2JFVvlVp3JZRB4Rd/2UKoI4NaFD8yiQSaCwyg5fn6Kszk5kjDX fVuzG52F1qoAMyFwqyZjcsXE+m+3vZEit4gANqCyvjbNkW3y6xv+sEOm+ZeDBy6YbnkA 5gPic+LwL3/0UK9NzeW37uAZRu2pIiEBbpya3Oh4RPLMYDnexpXMVxbw6h6U/qkVAGmA HC5uuAMTcinabL6VKtFMcxA3awXG0SBouZ9EY8MRo5Rw6HYpGP4NGYMEpeXwOtzBcVHN thFPEtEk52DY68Uj9PryIbFxA8ygDxYW9QiW6evZEtsWye6P4QrolEIXu2ayTqrf0YR8 HK+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730805585; x=1731410385; 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=G3DkeEcruqixMHeVvkc/55DZL7+DSMMcCtNLajeMDec=; b=C7vdLfAKSzmlqeiSM4QsL9N4wwC41xGdRSSvRJp4TdS6Hu5msbvVJatU/sXtJUeAQs AAMajbxu5/m72bt7JgaIl+fNipmdYoNKqtfYj8gvPMky4NxnoOWQvEE//7Bl84eWgyf8 UIjyCRxkV16omcauWw3fssrr1wd/PxfrJSGEZ/QdyApfEG90tHIbz6Yhvi+WnP7Fzyby WwJoARw7guaxO40ztxvlr6G/9z/Ezvq+HwUS5D+Ugcjw8u+N9JxEIyRGcDwt5qPiafoh zFg6y/ECbFI4kJmUMgw3w1qoNPDyx0fDollQbWQiI1c5qkdZ1sAUs3QYPvwv2cK1G41B 0yJg== X-Gm-Message-State: AOJu0YwccsjGqFud7MXenEhOZ9dhiq7BvVxit4Rm6eWxKw3u07Bafzva ahM+MoZaXZ6K20LJceQ0DIOCKMLn3/QkxYIui8xCODSRT5Z6xiqS8pDvCoo2JPTyuOArMZl1+7b l X-Google-Smtp-Source: AGHT+IEMxBnt7b3NBxyUraRHoLqu0jbeA3FnOcPfcQj2w4ez5x2T3Fi/EIGa1sqHM9CH0RnnL1w0MA== X-Received: by 2002:a05:6512:1150:b0:539:de0d:1e35 with SMTP id 2adb3069b0e04-53d65dd0926mr7255780e87.1.1730805585337; Tue, 05 Nov 2024 03:19:45 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/31] target/xtensa: Explicitly set 2-NaN propagation rule Date: Tue, 5 Nov 2024 11:19:18 +0000 Message-Id: <20241105111935.2747034-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241105111935.2747034-1-peter.maydell@linaro.org> References: <20241105111935.2747034-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::131; envelope-from=peter.maydell@linaro.org; helo=mail-lf1-x131.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730805731300116600 Set the NaN propagation rule explicitly in xtensa_use_first_nan(). (When we convert the softfloat pickNaNMulAdd routine to also select a NaN propagation rule at runtime, we will be able to remove the use_first_nan flag because the propagation rules will handle everything.) Signed-off-by: Peter Maydell Reviewed-by: Max Filippov Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20241025141254.2141506-15-peter.maydell@linaro.org --- target/xtensa/fpu_helper.c | 2 ++ fpu/softfloat-specialize.c.inc | 12 +----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/target/xtensa/fpu_helper.c b/target/xtensa/fpu_helper.c index 50a5efa65e2..f2d212d05df 100644 --- a/target/xtensa/fpu_helper.c +++ b/target/xtensa/fpu_helper.c @@ -60,6 +60,8 @@ static const struct { void xtensa_use_first_nan(CPUXtensaState *env, bool use_first) { set_use_first_nan(use_first, &env->fp_status); + set_float_2nan_prop_rule(use_first ? float_2nan_prop_ab : float_2nan_p= rop_ba, + &env->fp_status); } =20 void HELPER(wur_fpu2k_fcr)(CPUXtensaState *env, uint32_t v) diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc index 8bc95187178..b050c5eb04a 100644 --- a/fpu/softfloat-specialize.c.inc +++ b/fpu/softfloat-specialize.c.inc @@ -405,18 +405,8 @@ static int pickNaN(FloatClass a_cls, FloatClass b_cls, || defined(TARGET_TRICORE) || defined(TARGET_ARM) || defined(TARGET_MI= PS) \ || defined(TARGET_LOONGARCH64) || defined(TARGET_HPPA) \ || defined(TARGET_S390X) || defined(TARGET_PPC) || defined(TARGET_M68K= ) \ - || defined(TARGET_SPARC) + || defined(TARGET_SPARC) || defined(TARGET_XTENSA) g_assert_not_reached(); -#elif defined(TARGET_XTENSA) - /* - * Xtensa has two NaN propagation modes. - * Which one is active is controlled by float_status::use_first_na= n. - */ - if (status->use_first_nan) { - rule =3D float_2nan_prop_ab; - } else { - rule =3D float_2nan_prop_ba; - } #else rule =3D float_2nan_prop_x87; #endif --=20 2.34.1