]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm: Handle FPCR.AH in negation steps in FCADD
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 1 Feb 2025 16:39:41 +0000 (16:39 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 11 Feb 2025 16:22:07 +0000 (16:22 +0000)
commit72203eefab04a6903328807b0e3c635210031262
treeac2acb4a3df22da8a1d10d40cb18ce228b525eb7
parent416650ac2ba1f30ddb41bea92fe7b8b7d1f6ec73
target/arm: Handle FPCR.AH in negation steps in FCADD

The negation steps in FCADD must honour FPCR.AH's "don't change the
sign of a NaN" semantics.  Implement this by encoding FPCR.AH into
the SIMD data field passed to the helper and using that to decide
whether to negate the values.

The construction of neg_imag and neg_real were done to make it easy
to apply both in parallel with two simple logical operations.  This
changed with FPCR.AH, which is more complex than that. Switch to
an approach closer to the pseudocode, where we extract the rot
parameter from the SIMD data word and negate the appropriate
input value.

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