diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2025-05-19 15:51:11 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-06-06 14:32:55 +0200 |
commit | bc40e4fe6263f2c939ac8455033bfec18c9b3a0a (patch) | |
tree | 089289f79168913bd7619b706a590f26bf5cc45b /tests | |
parent | 23aec0d0e80a31d3fc3061e5c83432007502948a (diff) | |
download | qemu-bc40e4fe6263f2c939ac8455033bfec18c9b3a0a.zip qemu-bc40e4fe6263f2c939ac8455033bfec18c9b3a0a.tar.gz qemu-bc40e4fe6263f2c939ac8455033bfec18c9b3a0a.tar.bz2 |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tcg/x86_64/fma.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/tests/tcg/x86_64/fma.c b/tests/tcg/x86_64/fma.c index 09c622e..46f8630 100644 --- a/tests/tcg/x86_64/fma.c +++ b/tests/tcg/x86_64/fma.c @@ -79,14 +79,9 @@ static testdata tests[] = { /* * Flushing of denormal outputs to zero should also happen after * rounding, so setting FTZ should not affect the result or the flags. - * QEMU currently does not emulate this correctly because we do the - * flush-to-zero check before rounding, so we incorrectly produce a - * zero result and set Underflow as well as Precision. */ -#ifdef ENABLE_FAILING_TESTS { 0x3fdfffffffffffff, 0x001fffffffffffff, 0x801fffffffffffff, true, 0x8010000000000000, 0x20 }, /* Enabling FTZ shouldn't change flags */ -#endif }; int main(void) |