]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm: Implement FPCR.AH handling of negation of NaN
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 1 Feb 2025 16:39:34 +0000 (16:39 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 11 Feb 2025 16:22:07 +0000 (16:22 +0000)
commite76df44d2dd06018016f35aff41258ce356d6e40
treea929d286d693e0724b9c3b1ee3fbbe0eafdeefc7
parent4ba5383bc50d8ef18aed0d6aaa203c331dc0abf5
target/arm: Implement FPCR.AH handling of negation of NaN

FPCR.AH == 1 mandates that negation of a NaN value should not flip
its sign bit.  This means we can no longer use gen_vfp_neg*()
everywhere but must instead generate slightly more complex code when
FPCR.AH is set.

Make this change for the scalar FNEG and for those places in
translate-a64.c which were previously directly calling
gen_vfp_neg*().

This change in semantics also affects any other instruction whose
pseudocode calls FPNeg(); in following commits we extend this
change to the other affected instructions.

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