diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2024-11-05 10:09:54 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2024-11-05 10:09:54 +0000 |
commit | 2915876e035088d516d88394028903064072543e (patch) | |
tree | 104ee564dddef6a64570a0239f8680d0a3920858 /target/hppa | |
parent | 1bb5257def132090bdff2cd1352841915553aaaf (diff) | |
download | qemu-2915876e035088d516d88394028903064072543e.zip qemu-2915876e035088d516d88394028903064072543e.tar.gz qemu-2915876e035088d516d88394028903064072543e.tar.bz2 |
target/hppa: Explicitly set 2-NaN propagation rule
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
Diffstat (limited to 'target/hppa')
-rw-r--r-- | target/hppa/fpu_helper.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/hppa/fpu_helper.c b/target/hppa/fpu_helper.c index deaed2b..0e44074 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) |