]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm: Implement FPCR.AH semantics for scalar FMIN/FMAX
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 1 Feb 2025 16:39:27 +0000 (16:39 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 11 Feb 2025 16:22:07 +0000 (16:22 +0000)
commit2a734f3fe3cf528f3cf2f69600e88797b937201a
treede0a05a9396c51879c66cfb023d575f4222b6a7a
parent7bcde0c6dd9e7d150fb530b85f9218270db98638
target/arm: Implement FPCR.AH semantics for scalar FMIN/FMAX

When FPCR.AH == 1, floating point FMIN and FMAX have some odd special
cases:

 * comparing two zeroes (even of different sign) or comparing a NaN
   with anything always returns the second argument (possibly
   squashed to zero)
 * denormal outputs are not squashed to zero regardless of FZ or FZ16

Implement these semantics in new helper functions and select them at
translate time if FPCR.AH is 1 for the scalar FMAX and FMIN insns.
(We will convert the other FMAX and FMIN insns in subsequent
commits.)

Note that FMINNM and FMAXNM are not affected.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
target/arm/tcg/helper-a64.c
target/arm/tcg/helper-a64.h
target/arm/tcg/translate-a64.c