]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/i386: Detect flush-to-zero after rounding
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 19 May 2025 14:51:11 +0000 (15:51 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 6 Jun 2025 12:32:55 +0000 (14:32 +0200)
commitbc40e4fe6263f2c939ac8455033bfec18c9b3a0a
tree089289f79168913bd7619b706a590f26bf5cc45b
parent23aec0d0e80a31d3fc3061e5c83432007502948a
target/i386: Detect flush-to-zero after rounding

The Intel SDM section 10.2.3.3 on the MXCSR.FTZ bit says that we
flush outputs to zero when we detect underflow, which is after
rounding.  Set the detect_ftz flag accordingly.

This allows us to enable the test in fma.c which checks this
behaviour.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250519145114.2786534-2-peter.maydell@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/tcg/fpu_helper.c
tests/tcg/x86_64/fma.c