From patchwork Mon Dec 2 13:13:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 846641 Delivered-To: patch@linaro.org Received: by 2002:a5d:4cd0:0:b0:385:e875:8a9e with SMTP id c16csp1213688wrt; Mon, 2 Dec 2024 05:41:18 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWiPG5jHNVgLtuge82yeyioELJmqLWBA/i85rERKUfigPVHLYgsp6+h4k4ROAoE8OJ52DqaUg==@linaro.org X-Google-Smtp-Source: AGHT+IH/QuKmlpkQ+uR2sl60/4DbwRiUNHH78H1fuU6gBKmeMp5lsFKZzWQnzAltWVIUJnWT9x3l X-Received: by 2002:ac8:5f94:0:b0:466:96ef:90c with SMTP id d75a77b69052e-466b3610acemr353057601cf.41.1733146877835; Mon, 02 Dec 2024 05:41:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733146877; cv=none; d=google.com; s=arc-20240605; b=WAAem1XZ9vVI5IbSWlB+GndsHfHAYRQDrGZZVvq79XAAHBrSWndTLCDmjs1sgAnlDQ wJBGhLBqqnplm3DVA4mcJr2Tfi9Ia1iW53vibQaesxB66D9hUnvdJUjYFjqeIVvmunU3 h2koSdL325z3vfhxbmdVKetA7PgzrtIEBMsd1IVB79uBCI84MH8/4M90EKrtz/E7s2h1 l0nsi9cA2OoK4waoAkOQ1PD+lq6f0ZxjkSfDtPhnNKpsWRdDE64DcrguNzQljFoSM3NW E2DVohNKTGAOt5X0tM2QUd1NshDIYXn7GWX9//+GjlS6KKuHYvPkeL8M8/JVyyJiTbGR 8njg== 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=eg5CLJnIGFMP+7pRukJjMkkCwPMh6g96Ep2h3Ltgz5o=; fh=QgE9QYJDVj//6C0QJWGeEM+qaFVaxwMel1ZWqkEy6K0=; b=cj2LkV9rioo1f4Sf4wL4GDrf+Bx8WUg0wEX5eHOoc2jdOLpGLHM2jwsKSjYKOT+Try 2R7YEwcRmyOAfNB/n91PBFDYZAqFQU9OEpAx8ZWQaciuOA/HQRsgeP8iDndQlummE4Uh tBOUlrPQ6zQsSRwDTMsmEXM6/rVXqVGJnghgTU7Fd20e0bqWLab/W3OH5abDr76MnhV+ 6ZcP29yIEG3pFAzkPUluNwx6oM5UCA/NQSNUhia8L0CXvnF2VJ2QbtwF8ELsrArViYro bb/ZyPE0Bvu4belSKeGvFjIrzbsRhKXoZw8ZC1yTt7FMQYdkzG5E9Anm+Y6eEvW0vBp3 7Kjg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SHxdBlKI; 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 d75a77b69052e-466c4109afdsi117987501cf.255.2024.12.02.05.41.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Dec 2024 05:41:17 -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=SHxdBlKI; 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 1tI6WC-0005MT-17; Mon, 02 Dec 2024 08:31:16 -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 1tI6HB-0003In-CG for qemu-devel@nongnu.org; Mon, 02 Dec 2024 08:15:49 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tI6GY-0003QM-US for qemu-devel@nongnu.org; Mon, 02 Dec 2024 08:15:37 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-434a1639637so39752815e9.1 for ; Mon, 02 Dec 2024 05:14:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733145283; x=1733750083; 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=eg5CLJnIGFMP+7pRukJjMkkCwPMh6g96Ep2h3Ltgz5o=; b=SHxdBlKI8lzA4bdclnx97YqShFw4jmFeVRkc/zNKmeT46cQx+gf2pKYwkF1u2FXCnQ YRRf46LVK4PSc31Dnx/yHqvCBAxr4Fcu/x0i9Kc5VXv9xH1I3SVB0biq7/UiHkp5SGw+ tegqU/XkeqwZ84h16maHbo+68tQx9jTMNlfRhdZeyPuLInilfzk8IKsVbEU/dGvGAL2t TUeMek1wjGS3NxGUp5HYv6y7M1A63gvxl4vq3RFdGQiA3cAUhPwTkwcXTLxjd5EjVeM6 mc3CnIJMnDfomHSdqs2jLCe7A1O4F2bca1dSboyJ1syh9xr4ViRDF05fDtDpHH9vywDp c5Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733145283; x=1733750083; 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=eg5CLJnIGFMP+7pRukJjMkkCwPMh6g96Ep2h3Ltgz5o=; b=aBfUC++Hb9qEr9U621eN6hpEhyn8jz78Qh9GL7/HS3czUX+Q84hx4MgV89eJ0GnDZ3 Q06pgl9pq5ZUBzmqVF+iILeQr/qB84e+lCbGkrfi8Jq3I3QIPluKG2RfgtPHNhDW4Yrt vGlMbHoi9meG+RQAeHVxY4+WPWASffoobde0+QoHcmP8JjYJE8w8DXlSLXptVB8W/q/A oB4DJWSlds7xjUeqNO1vbLAet2eFwI+PU7Bx+JEn+95LYcZuPFA3gxd+G72+sRPReBzw r3zabQV4rpnW7Xde+Yb0MiJdZtcsW+l0qPcQ1EUrIFz5RmZJnio64htoMy8TWNq75utT L1RA== X-Gm-Message-State: AOJu0Yz8t4HPiDj5Dt1ZieUjav4i1PzzKDwITxX04bbA7TkUY//XOGtv /hR5salh2pXTsbpY45YbeNNLf6yOCy6t+PnPkCQBAZOnF/5eWLWTcUzIkvfwsb4ktPwmu2agz/J 5 X-Gm-Gg: ASbGnctPkkHxfZ87L0S7q7YRcsYRxiHer9+JK8Nsx5GR8t+PijsZbvUsj2bcjOhlmWa Uan85b3XP3ToEQV8TpyH0VBLBSI1cU9RVPBTCviycQbUayjtejp+Yo3lSlPPYw/vNkwRFgiBBGE 4lCYQeTkrRz93BFpJvan0yIu3LUlAt2YagwNA6G5GIibbjm6vveQdGRcLTxFcfHTntAQWALvNlZ J1czAswliVLuwzgZl0qbarHCxY1n/JtAHPNrePKm6HWWhqGsn1/tQI= X-Received: by 2002:a05:6000:1865:b0:382:4a3b:5139 with SMTP id ffacd0b85a97d-385c6ef598emr19334141f8f.59.1733145282505; Mon, 02 Dec 2024 05:14:42 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385dea1e4ebsm10160157f8f.1.2024.12.02.05.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 05:14:42 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-s390x@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Paolo Bonzini , Eduardo Habkost , Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Rikalo , Nicholas Piggin , Daniel Henrique Barboza , David Hildenbrand , Ilya Leoshkevich , Thomas Huth , Mark Cave-Ayland , Artyom Tarasenko , Max Filippov Subject: [PATCH v2 for-10.0 36/54] target/microblaze: Set default NaN pattern explicitly Date: Mon, 2 Dec 2024 13:13:29 +0000 Message-Id: <20241202131347.498124-37-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202131347.498124-1-peter.maydell@linaro.org> References: <20241202131347.498124-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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=unavailable 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 default NaN pattern explicitly, and remove the ifdef from parts64_default_nan(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/microblaze/cpu.c | 2 ++ fpu/softfloat-specialize.c.inc | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 710eb1146c1..0e1e22d1e8e 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -207,6 +207,8 @@ static void mb_cpu_reset_hold(Object *obj, ResetType type) * this architecture. */ set_float_2nan_prop_rule(float_2nan_prop_x87, &env->fp_status); + /* Default NaN: sign bit set, most significant frac bit set */ + set_float_default_nan_pattern(0b11000000, &env->fp_status); #if defined(CONFIG_USER_ONLY) /* start in user mode with interrupts enabled. */ diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc index b1ec534983c..d77404f0c47 100644 --- a/fpu/softfloat-specialize.c.inc +++ b/fpu/softfloat-specialize.c.inc @@ -139,8 +139,7 @@ static void parts64_default_nan(FloatParts64 *p, float_status *status) #if defined(TARGET_SPARC) || defined(TARGET_M68K) /* Sign bit clear, all frac bits set */ dnan_pattern = 0b01111111; -#elif defined(TARGET_I386) || defined(TARGET_X86_64) \ - || defined(TARGET_MICROBLAZE) +#elif defined(TARGET_I386) || defined(TARGET_X86_64) /* Sign bit set, most significant frac bit set */ dnan_pattern = 0b11000000; #elif defined(TARGET_HPPA)