aboutsummaryrefslogtreecommitdiff
path: root/rust/hw/char/pl011/src/lib.rs
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2025-01-16 11:25:35 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2025-02-07 15:51:01 +0100
commit2b3bfbb21b08bfd9aa49b665b66851e9ebf62802 (patch)
treeb5b8b1f6be228b438ac764d229f3db018efc7c1a /rust/hw/char/pl011/src/lib.rs
parent6b03c038067f2171110425593f722df8f4d19d17 (diff)
downloadqemu-2b3bfbb21b08bfd9aa49b665b66851e9ebf62802.zip
qemu-2b3bfbb21b08bfd9aa49b665b66851e9ebf62802.tar.gz
qemu-2b3bfbb21b08bfd9aa49b665b66851e9ebf62802.tar.bz2
target/i386: Do not raise Invalid for 0 * Inf + QNaN
In commit 8adcff4ae7 ("fpu: handle raising Invalid for infzero in pick_nan_muladd") we changed the handling of 0 * Inf + QNaN to always raise the Invalid exception regardless of target architecture. (This was a change affecting hppa, i386, sh4 and tricore.) However, this was incorrect for i386, which documents in the SDM section 14.5.2 that for the 0 * Inf + NaN case that it will only raise the Invalid exception when the input is an SNaN. (This is permitted by the IEEE 754-2008 specification, which documents that whether we raise Invalid for 0 * Inf + QNaN is implementation defined.) Adjust the softfloat pick_nan_muladd code to allow the target to suppress the raising of Invalid for the inf * zero + NaN case (as an extra flag orthogonal to its choice for when to use the default NaN), and enable that for x86. We do not revert here the behaviour change for hppa, sh4 or tricore: * The sh4 manual is clear that it should signal Invalid * The tricore manual is a bit vague but doesn't say it shouldn't * The hppa manual doesn't talk about fused multiply-add corner cases at all Cc: qemu-stable@nongnu.org Fixes: 8adcff4ae7 (""fpu: handle raising Invalid for infzero in pick_nan_muladd") Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Link: https://lore.kernel.org/r/20250116112536.4117889-2-peter.maydell@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw/char/pl011/src/lib.rs')
0 files changed, 0 insertions, 0 deletions