qemu/include
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
..
authz Prefer 'on' | 'off' over 'yes' | 'no' for bool options 2021-01-29 17:07:53 +00:00
block Block layer patches 2025-02-10 13:25:36 -05:00
chardev chardev/char-hub: implement backend chardev aggregator 2025-02-03 13:57:08 +04:00
crypto crypto: Introduce SM3 hash hmac pbkdf algorithm 2024-11-05 18:37:18 +00:00
disas disas: Fix build against Capstone v6 (again) 2024-11-05 10:09:59 +00:00
exec Migration pull request 2025-01-30 10:29:22 -05:00
fpu fpu: allow flushing of output denormals to be after rounding 2025-02-11 16:22:07 +00:00
gdbstub gdbstub/helpers: Introduce ldtul_$endian_p() helpers 2024-10-15 11:55:09 -03:00
hw target-arm queue: 2025-02-10 13:22:07 -05:00
io qio: add support for SO_PEERCRED for socket channel 2024-07-22 13:47:41 +02:00
libdecnumber Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
migration migration: cpr-transfer mode 2025-01-29 11:56:24 -03:00
monitor monitor: Remove obsolete stubs 2024-06-30 19:51:44 +03:00
net net: checksum: Convert data to void * 2024-11-25 13:59:50 +08:00
qapi qapi: change 'unsigned special_features' to 'uint64_t features' 2025-02-10 15:45:04 +01:00
qemu osdep: Introduce qemu_kill_thread() 2025-02-10 13:47:59 +00:00
qobject qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
qom qom: remove unused field 2025-01-10 23:34:44 +01:00
scsi hw/ufs: Support for UFS logical unit 2023-09-07 14:01:29 -04:00
semihosting semihosting/console: Avoid including 'cpu.h' 2025-01-17 10:44:00 +00:00
standard-headers hw/acpi: Add vmclock device 2025-01-15 17:43:24 -05:00
system testing and gdbstub updates: 2025-02-10 13:26:17 -05:00
tcg tcg: Document tb_lookup() and tcg_tb_lookup() 2025-01-17 08:24:43 -08:00
ui ui/input-legacy.c: remove unused legacy qemu_add_kbd_event_handler() function 2024-11-08 11:06:42 +01:00
user user: Introduce host_interrupt_signal 2025-02-10 13:47:59 +00:00
elf.h util: spelling fixes 2023-08-31 19:47:43 +02:00
glib-compat.h Bump minimum glib version to v2.66 2024-05-14 12:46:24 +02:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-main.h ui & main loop: Redesign of system-specific main thread event handling 2024-12-31 21:21:34 +01:00