qemu/tests
Peter Maydell 28f13bccbe fpu: allow flushing of output denormals to be after rounding
Currently we handle flushing of output denormals in uncanon_normal
always before we deal with rounding.  This works for architectures
that detect tininess before rounding, but is usually not the right
place when the architecture detects tininess after rounding.  For
example, for x86 the SDM states that the MXCSR FTZ control bit causes
outputs to be flushed to zero "when it detects a floating-point
underflow condition".  This means that we mustn't flush to zero if
the input is such that after rounding it is no longer tiny.

At least one of our guest architectures does underflow detection
after rounding but flushing of denormals before rounding (MIPS MSA);
this means we need to have a config knob for this that is separate
from our existing tininess_before_rounding setting.

Add an ftz_detection flag.  For consistency with
tininess_before_rounding, we make it default to "detect ftz after
rounding"; this means that we need to explicitly set the flag to
"detect ftz before rounding" on every existing architecture that sets
flush_to_zero, so that this commit has no behaviour change.
(This means more code change here but for the long term a less
confusing API.)

For several architectures the current behaviour is either
definitely or possibly wrong; annotate those with TODO comments.
These architectures are definitely wrong (and should detect
ftz after rounding):
 * x86
 * Alpha

For these architectures the spec is unclear:
 * MIPS (for non-MSA)
 * RX
 * SH4

PA-RISC makes ftz detection IMPDEF, but we aren't setting the
"tininess before rounding" setting that we ought to.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2025-02-11 16:22:07 +00:00
..
avocado tests/functional/test_mips_malta: Convert the mips big endian replay tests 2025-01-30 10:51:24 +01:00
bench tests/bench: Rename test_akcipher_keys.inc -> test_akcipher_keys.c.inc 2024-09-20 10:08:24 +03:00
data target/riscv: add shgatpa 2025-01-19 09:44:34 +10:00
decode tests/: spelling fixes 2023-09-08 13:08:52 +03:00
docker tests/docker: replicate the check-rust-tools-nightly CI job 2025-02-10 13:47:58 +00:00
fp fpu: allow flushing of output denormals to be after rounding 2025-02-11 16:22:07 +00:00
functional trivial patches for 2025-01-30 2025-01-30 15:11:49 -05:00
guest-debug tests/tcg: Add late gdbstub attach test 2025-02-10 13:47:59 +00:00
image-fuzzer image-fuzzer: Use OSerror.strerror instead of tuple subscript 2019-11-05 16:36:11 +01:00
include tests: add missing generated sources to testqapi 2020-10-17 10:45:50 -04:00
keys tests/vm: Add Haiku test based on their vagrant images 2020-11-17 09:45:24 +01:00
lcitool tests/lcitool: remove temp workaround for debian mips64el 2025-01-11 11:22:01 +00:00
migration-stress tests/migration: Disambiguate guestperf vs. a-b 2024-12-12 10:25:39 -03:00
multiboot Remove superfluous .gitignore files 2020-10-13 12:48:17 +02:00
perf/block/qcow2 tests/perf: Test lseek influence on qcow2 block-status 2019-06-04 15:20:41 +02:00
qapi-schema qapi: expose all schema features to code 2025-02-10 15:45:04 +01:00
qemu-iotests iotests: Add (NBD-based) tests for inactive nodes 2025-02-06 14:47:51 +01:00
qtest testing and gdbstub updates: 2025-02-10 13:26:17 -05:00
rocker
tcg testing and gdbstub updates: 2025-02-10 13:26:17 -05:00
tsan block: remove AioContext locking 2023-12-21 22:49:27 +01:00
uefi-test-tools tests/data/uefi-boot-images: Add RISC-V ISO image 2024-07-03 18:14:06 -04:00
unit qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
vm tests/vm: allow interactive login as root 2025-01-11 11:22:01 +00:00
vmstate-static-checker-data hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
dbus-vmstate-daemon.sh tests: add dbus-vmstate-test 2020-01-06 18:41:32 +04:00
Makefile.include tests/functional: enable pre-emptive caching of assets 2024-09-04 10:52:29 +02:00
meson.build qapi: expose all schema features to code 2025-02-10 15:45:04 +01:00
test-qht-par.c
vhost-user-bridge.c error handling: Use RETRY_ON_EINTR() macro where applicable 2023-01-09 13:50:47 +01:00