From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 06/31] target/hppa: Explicitly set 2-NaN propagation rule
Date: Tue, 5 Nov 2024 11:19:10 +0000 [thread overview]
Message-ID: <20241105111935.2747034-7-peter.maydell@linaro.org> (raw)
In-Reply-To: <20241105111935.2747034-1-peter.maydell@linaro.org>
Set the 2-NaN propagation rule explicitly in env->fp_status.
Really we only need to do this at CPU reset (after reset has zeroed
out most of the CPU state struct, which typically includes fp_status
fields). However target/hppa does not currently implement CPU reset
at all, so leave a TODO comment to note that this could be moved if
we ever do implement reset.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20241025141254.2141506-7-peter.maydell@linaro.org
---
target/hppa/fpu_helper.c | 6 ++++++
fpu/softfloat-specialize.c.inc | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/target/hppa/fpu_helper.c b/target/hppa/fpu_helper.c
index deaed2b65d1..0e44074ba82 100644
--- a/target/hppa/fpu_helper.c
+++ b/target/hppa/fpu_helper.c
@@ -49,6 +49,12 @@ void HELPER(loaded_fr0)(CPUHPPAState *env)
d = FIELD_EX32(shadow, FPSR, D);
set_flush_to_zero(d, &env->fp_status);
set_flush_inputs_to_zero(d, &env->fp_status);
+
+ /*
+ * TODO: we only need to do this at CPU reset, but currently
+ * HPPA does note implement a CPU reset method at all...
+ */
+ set_float_2nan_prop_rule(float_2nan_prop_s_ab, &env->fp_status);
}
void cpu_hppa_loaded_fr0(CPUHPPAState *env)
diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc
index bbc3b70fa9d..4e51cf8d083 100644
--- a/fpu/softfloat-specialize.c.inc
+++ b/fpu/softfloat-specialize.c.inc
@@ -403,9 +403,9 @@ static int pickNaN(FloatClass a_cls, FloatClass b_cls,
#if defined(TARGET_AVR) || defined(TARGET_HEXAGON) \
|| defined(TARGET_RISCV) || defined(TARGET_SH4) \
|| defined(TARGET_TRICORE) || defined(TARGET_ARM) || defined(TARGET_MIPS) \
- || defined(TARGET_LOONGARCH64)
+ || defined(TARGET_LOONGARCH64) || defined(TARGET_HPPA)
g_assert_not_reached();
-#elif defined(TARGET_HPPA) || defined(TARGET_S390X)
+#elif defined(TARGET_S390X)
rule = float_2nan_prop_s_ab;
#elif defined(TARGET_PPC) || defined(TARGET_M68K)
/*
--
2.34.1
next prev parent reply other threads:[~2024-11-05 11:21 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 11:19 [PULL 00/31] target-arm queue Peter Maydell
2024-11-05 11:19 ` [PULL 01/31] softfloat: Allow 2-operand NaN propagation rule to be set at runtime Peter Maydell
2024-11-05 11:19 ` [PULL 02/31] tests/fp: Explicitly set 2-NaN propagation rule Peter Maydell
2024-11-05 11:19 ` [PULL 03/31] target/arm: " Peter Maydell
2024-11-05 11:19 ` [PULL 04/31] target/mips: " Peter Maydell
2024-11-05 11:19 ` [PULL 05/31] target/loongarch: " Peter Maydell
2024-11-05 11:19 ` Peter Maydell [this message]
2024-11-05 11:19 ` [PULL 07/31] target/s390x: " Peter Maydell
2024-11-05 11:19 ` [PULL 08/31] target/ppc: " Peter Maydell
2024-11-05 11:19 ` [PULL 09/31] target/m68k: " Peter Maydell
2024-11-05 11:19 ` [PULL 10/31] target/m68k: Initialize float_status fields in gdb set/get functions Peter Maydell
2024-11-05 11:19 ` [PULL 11/31] target/sparc: Move cpu_put_fsr(env, 0) call to reset Peter Maydell
2024-11-05 11:19 ` [PULL 12/31] target/sparc: Explicitly set 2-NaN propagation rule Peter Maydell
2024-11-05 11:19 ` [PULL 13/31] target/xtensa: Factor out calls to set_use_first_nan() Peter Maydell
2024-11-05 11:19 ` [PULL 14/31] target/xtensa: Explicitly set 2-NaN propagation rule Peter Maydell
2024-11-05 11:19 ` [PULL 15/31] target/i386: Set 2-NaN propagation rule explicitly Peter Maydell
2024-11-05 11:19 ` [PULL 16/31] target/alpha: Explicitly set 2-NaN propagation rule Peter Maydell
2024-11-05 11:19 ` [PULL 17/31] target/microblaze: Move setting of float rounding mode to reset Peter Maydell
2024-11-05 11:19 ` [PULL 18/31] target/microblaze: Explicitly set 2-NaN propagation rule Peter Maydell
2024-11-05 11:19 ` [PULL 19/31] target/openrisc: " Peter Maydell
2024-11-05 11:19 ` [PULL 20/31] target/rx: " Peter Maydell
2024-11-05 11:19 ` [PULL 21/31] softfloat: Remove fallback rule from pickNaN() Peter Maydell
2024-11-05 11:19 ` [PULL 22/31] Revert "target/arm: Fix usage of MMU indexes when EL3 is AArch32" Peter Maydell
2024-11-05 11:19 ` [PULL 23/31] target/arm: Add new MMU indexes for AArch32 Secure PL1&0 Peter Maydell
2024-11-05 11:19 ` [PULL 24/31] target/arm: Fix SVE SDOT/UDOT/USDOT (4-way, indexed) Peter Maydell
2024-11-05 11:19 ` [PULL 25/31] disas: Fix build against Capstone v6 (again) Peter Maydell
2024-11-05 11:19 ` [PULL 26/31] hw/rtc/ds1338: Trace send and receive operations Peter Maydell
2024-11-05 11:19 ` [PULL 27/31] hw/timer/imx_gpt: Convert DPRINTF to trace events Peter Maydell
2024-11-05 11:19 ` [PULL 28/31] hw/watchdog/wdt_imx2: Remove redundant assignment Peter Maydell
2024-11-05 11:19 ` [PULL 29/31] hw/sensor/tmp105: Convert printf() to trace event, add tracing for read/write access Peter Maydell
2024-11-05 11:19 ` [PULL 30/31] hw/net/npcm_gmac: Change error log to trace event Peter Maydell
2024-11-05 11:19 ` [PULL 31/31] target/arm: Enable FEAT_CMOW for -cpu max Peter Maydell
2024-11-06 11:15 ` [PULL 00/31] target-arm queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241105111935.2747034-7-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).