diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2024-12-11 15:31:04 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2024-12-11 15:31:04 +0000 |
commit | f69da79196ab586a7cacbeecb6809ffa8d8e258c (patch) | |
tree | 24eb7a5d8af2bb31e6a7318f1630478699ac9433 /target/i386 | |
parent | 223f4f2e78bd0431d246370e82ae0ac545f0c8d8 (diff) | |
download | qemu-f69da79196ab586a7cacbeecb6809ffa8d8e258c.zip qemu-f69da79196ab586a7cacbeecb6809ffa8d8e258c.tar.gz qemu-f69da79196ab586a7cacbeecb6809ffa8d8e258c.tar.bz2 |
target/i386: Set default NaN pattern explicitly
Set the default NaN pattern explicitly, and remove the ifdef from
parts64_default_nan().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20241202131347.498124-38-peter.maydell@linaro.org
Diffstat (limited to 'target/i386')
-rw-r--r-- | target/i386/tcg/fpu_helper.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 4303b33..d0a1e2f 100644 --- a/target/i386/tcg/fpu_helper.c +++ b/target/i386/tcg/fpu_helper.c @@ -181,6 +181,10 @@ void cpu_init_fp_statuses(CPUX86State *env) */ set_float_infzeronan_rule(float_infzeronan_dnan_never, &env->sse_status); set_float_3nan_prop_rule(float_3nan_prop_abc, &env->sse_status); + /* Default NaN: sign bit set, most significant frac bit set */ + set_float_default_nan_pattern(0b11000000, &env->fp_status); + set_float_default_nan_pattern(0b11000000, &env->mmx_status); + set_float_default_nan_pattern(0b11000000, &env->sse_status); } static inline uint8_t save_exception_flags(CPUX86State *env) |