target/i386: Set 2-NaN propagation rule explicitly

Set the NaN propagation rule explicitly for the float_status words
used in the x86 target.

This is a no-behaviour-change commit, so we retain the existing
behaviour of using the x87-style "prefer QNaN over SNaN, then prefer
the NaN with the larger significand" for MMX and SSE.  This is
however not the documented hardware behaviour, so we leave a TODO
note about what we should be doing instead.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20241025141254.2141506-16-peter.maydell@linaro.org
This commit is contained in:
Peter Maydell 2024-11-05 10:09:56 +00:00
parent 8d988eb44c
commit 62d39b28ef
4 changed files with 49 additions and 1 deletions

View file

@ -405,7 +405,8 @@ static int pickNaN(FloatClass a_cls, FloatClass b_cls,
|| defined(TARGET_TRICORE) || defined(TARGET_ARM) || defined(TARGET_MIPS) \
|| defined(TARGET_LOONGARCH64) || defined(TARGET_HPPA) \
|| defined(TARGET_S390X) || defined(TARGET_PPC) || defined(TARGET_M68K) \
|| defined(TARGET_SPARC) || defined(TARGET_XTENSA)
|| defined(TARGET_SPARC) || defined(TARGET_XTENSA) \
|| defined(TARGET_I386)
g_assert_not_reached();
#else
rule = float_2nan_prop_x87;