]> git.ipfire.org Git - thirdparty/qemu.git/commit
softfloat: Handle default NaN mode after pickNaNMulAdd, not before
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 10 May 2018 17:10:56 +0000 (18:10 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 11 Jul 2018 16:48:22 +0000 (11:48 -0500)
commit51d5decb322303b9e8a99a614d228ef7317741b8
tree3b04be0d6a3b132f4a1e6d3a7a8dd608b40ad67c
parent0e4b4b4fd36c70f0c4030a4d0be7b442616ec5da
softfloat: Handle default NaN mode after pickNaNMulAdd, not before

It is implementation defined whether a multiply-add of
(0,inf,qnan) or (inf,0,qnan) raises InvalidaOperation or
not, so we let the target-specific pickNaNMulAdd function
handle this. This means that we must do the "return the
default NaN in default NaN mode" check after the call,
not before. Correct the ordering, and restore the comment
from the old propagateFloat64MulAddNaN() that warned about
this corner case.

This fixes a regression from 2.11 for Arm guests where we would
incorrectly fail to set the Invalid flag for these cases.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20180504100547.14621-1-peter.maydell@linaro.org
(cherry picked from commit 1839189bbf89889076aadf0c793c1b57977b28d7)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
fpu/softfloat.c