From patchwork Wed Dec 11 16:19:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 849178 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp415442wry; Wed, 11 Dec 2024 08:24:24 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXiq28ONv4Ly0jiYq/1h5H8tLPDL7gnCNELBggISsUcW0SfxagQnnwkFqBh6z44YAeqtShT0g==@linaro.org X-Google-Smtp-Source: AGHT+IHCrpLenWQpJng9N9jD8YOTK2OWoDnl+XkBbnhXf6cZsoipVdejrsSGsLgoeFOMxscEzM2H X-Received: by 2002:a05:6102:c91:b0:4af:c3ed:b926 with SMTP id ada2fe7eead31-4b245f0ecbemr1074636137.23.1733934264298; Wed, 11 Dec 2024 08:24:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733934264; cv=none; d=google.com; s=arc-20240605; b=g9eQOqEUuOrMDdS2lpm1uoIlttV9DKozPfVI20RZcIeb5fNOvFfEwPvqLay0s/+scr 44zWlrfZqmtGiKkFxg8BaESCwE8UO9V7BfiW4yaIbh6AKcVK1S0w20VbhI6q2Yq0wsmE +VhfP2hs0FZu5vQkRzVwxtk3OvQAqzm0P64rm4C/IOo4d68usz5oKN52RGIg8qNOYhuh cCgV0/jy3Mvhf+7br43mU5yHFpcU3Jcs8amSPNSkBBNHCETgsnrGlax6k2fJT226p4HB 8OJ6OoAAd/du2U4G4SmnfnG5CZDedKqesV6jPB6Yy1I10K7L+lsAOfCiCnaNWGD3TOa3 ZxjA== 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=elThihR9o8htBA19kSW3jQQIVfaQiQSaHPvk+cMrk5s=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=k65wWhuo1DBIIw7GxWWhaSk4thAkxUG//DrXE693D5OeImmDeWl2AxlZCVDQdm96Gc WgjT4ce95L0tltsze+dxItGfIn9qq7PdNF8WE3LxzuFLmP2X0HWZlqIro8awO2TnoVno XCDAtR60TbESSRSbk8cXXH1Xzuoo+PcN0D5rIBZSmKODma0iv97kPHg1+bmW4sT9mhm6 jw5J73BLxUA7Wo6NgRJygYWMHFBsKLeLoTQROySa77hPHpR9hMAtsP2CcKAl0BumYY88 jewLUSATbl/TnqOcM7SiyDL6X6w+PnU2WSHpjIj+eQtJSVHs4u9KP5fM0v5so4yZ0gt4 eBKg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EvFITmLk; 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 ada2fe7eead31-4afd68a94b5si2689972137.743.2024.12.11.08.24.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Dec 2024 08:24:24 -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=EvFITmLk; 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 1tLPS8-0000KR-Cw; Wed, 11 Dec 2024 11:20:44 -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 1tLPS4-0000Ic-EL for qemu-devel@nongnu.org; Wed, 11 Dec 2024 11:20:40 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLPS2-0007jT-V2 for qemu-devel@nongnu.org; Wed, 11 Dec 2024 11:20:40 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43618283dedso16746635e9.3 for ; Wed, 11 Dec 2024 08:20:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733934037; x=1734538837; 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=elThihR9o8htBA19kSW3jQQIVfaQiQSaHPvk+cMrk5s=; b=EvFITmLkbf9/a+6VXSCWi+R3P6p+1Qu/hzAXgVdQbEsDAUby8QEzMYt/HQQff6UXf0 zcZLzOqUUW+S/sRNW2PakzxY/KmjBU95xvmTH5UoNxfJiF/kcp169KuxCyUjMeruGdil 7oAOQlTpF1TUOGPEHT6wq/+1bMMiPxcZe7QVZvf4CEvqTOxZBEJF+PEZxEGZFEecAAm9 OM80TLReaBmmIzMEQBF4BjI0ciIBMDqNkfHZlvAtKuvVWhmJbEzbFhLWe7Vo4H1PDSE6 X3ziIpZ23aSpY5LBsK+XszQoNSDQ23VzbUbfsU0+8EQWhS2RxgZnaLyadzr7XYfygBYd vVmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733934037; x=1734538837; 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=elThihR9o8htBA19kSW3jQQIVfaQiQSaHPvk+cMrk5s=; b=LZW7uRdkPeJpSSKFy3l0IE/Yu/+ox3ithVNoT10jZzF2MKdQ7iq0ZH85nfzghJKyxy Wtr10v0CAaxJeUsCU2MTERZWocDnSJofyBeJUF4vCkb1cx86iKTc4O0I1ttKB5Iqx61m 2ycpu88VNoYJXIkAnAXc3BDAd9dgQS/LOcJNdymJkR2MXTg+sge7l16HrsTgDA7C2GzD L3L3D3gROE3BHbMtV+SCFJawAmiB5d8yjx6er68JuabwaWhO9R0B9ZZ9xAM/DVP3+3XT 8EwtnsY5mC4T1usGGaIo8ymGrfAynO+fq5JojHW9GzGxksjXROyBBABQvkL331BcvDyM s0vQ== X-Gm-Message-State: AOJu0Yw+reL53an6y4NVaU2uEpxOOq0NI01MZPJBVy8eTViv5HT4/NX/ A+zwMj7BOJnOuP2DJDDL+6td19M4VB5Ru+DTmk+Bk+w0b6ZCi1AKWV93YBnDHWkDMdOZjQUrg+F A X-Gm-Gg: ASbGncuo8Azi6NYUsrHsXHHrx+tJMTpU6hPa6GbJ//DeNVo7cYn4PEJPv5DeT/EN1Rn sP93RZkVA++sFsGsoSDfPtt024Wgl3n8JlVV3dvfxcZVMs0klMOEZjBZLDd991SIZd6tD1YNODk +3JYpofPwnXIFPFYcJEs1lV/MDvI3dzsuc10CuNPadG4Hbx5bB4p7Ii/dpkeM2wlY7bK+VnsNrY Czln71wSU5mX1JvwJdkgC67mC+tWyQ5AJ06Hx71iZvGvB7454SqU1L/IZTx X-Received: by 2002:a05:600c:1d2a:b0:434:a781:f5e2 with SMTP id 5b1f17b1804b1-4362282ab63mr3103675e9.8.1733934037628; Wed, 11 Dec 2024 08:20:37 -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.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 08:20:36 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 26/72] target/sparc: Set Float3NaNPropRule explicitly Date: Wed, 11 Dec 2024 16:19:18 +0000 Message-Id: <20241211162004.2795499-27-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::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.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 Float3NaNPropRule explicitly for SPARC, and remove the ifdef from pickNaNMulAdd(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20241202131347.498124-22-peter.maydell@linaro.org --- target/sparc/cpu.c | 2 ++ fpu/softfloat-specialize.c.inc | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 61f2d3fbf23..0f2997a85e6 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 fused-multiply add, prefer SNaN over QNaN, then C->B->A */ + set_float_3nan_prop_rule(float_3nan_prop_s_cba, &env->fp_status); /* For inf * 0 + NaN, return the input NaN */ set_float_infzeronan_rule(float_infzeronan_dnan_never, &env->fp_status); diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc index 8a36280df1a..c4d8d085a98 100644 --- a/fpu/softfloat-specialize.c.inc +++ b/fpu/softfloat-specialize.c.inc @@ -511,8 +511,6 @@ static int pickNaNMulAdd(FloatClass a_cls, FloatClass b_cls, FloatClass c_cls, } else { rule = float_3nan_prop_s_cab; } -#elif defined(TARGET_SPARC) - rule = float_3nan_prop_s_cba; #elif defined(TARGET_XTENSA) if (status->use_first_nan) { rule = float_3nan_prop_abc;