diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2024-11-05 10:09:57 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2024-11-05 10:09:57 +0000 |
commit | 4fafdcc833f2bfe0037512921dc37ebeed053853 (patch) | |
tree | 67de032534f47523a4cb63d6a0db23f203d926e9 /target | |
parent | c18a13edceca5419beb6eb703ffad6980d926f3b (diff) |
target/microblaze: Explicitly set 2-NaN propagation rule
Set the NaN propagation rule explicitly for the float_status word
used in the microblaze target.
This is probably not the architecturally correct behaviour,
but since this is a no-behaviour-change patch, we leave a
TODO note to that effect.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20241025141254.2141506-19-peter.maydell@linaro.org
Diffstat (limited to 'target')
-rw-r--r-- | target/microblaze/cpu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 6329a77433..14286deead 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -202,6 +202,11 @@ static void mb_cpu_reset_hold(Object *obj, ResetType type) env->pc = cpu->cfg.base_vectors; set_float_rounding_mode(float_round_nearest_even, &env->fp_status); + /* + * TODO: this is probably not the correct NaN propagation rule for + * this architecture. + */ + set_float_2nan_prop_rule(float_2nan_prop_x87, &env->fp_status); #if defined(CONFIG_USER_ONLY) /* start in user mode with interrupts enabled. */ |