qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

fpu/softfloat: raise float_invalid for NaN/Inf in round_to_int_and_pack

The re-factor broke the raising of INVALID when NaN/Inf is passed to
the float_to_int conversion functions. round_to_uint_and_pack got this
right for NaN but also missed out the Inf handling.

Fixes https://bugs.launchpad.net/qemu/+bug/1759264

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Tested-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20180413140334.26622-3-alex.bennee@linaro.org
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

authored by

Alex Bennée and committed by
Peter Maydell
801bc563 6245327a

+3
+3
fpu/softfloat.c
··· 1344 1344 case float_class_qnan: 1345 1345 case float_class_dnan: 1346 1346 case float_class_msnan: 1347 + s->float_exception_flags = orig_flags | float_flag_invalid; 1347 1348 return max; 1348 1349 case float_class_inf: 1350 + s->float_exception_flags = orig_flags | float_flag_invalid; 1349 1351 return p.sign ? min : max; 1350 1352 case float_class_zero: 1351 1353 return 0; ··· 1437 1439 s->float_exception_flags = orig_flags | float_flag_invalid; 1438 1440 return max; 1439 1441 case float_class_inf: 1442 + s->float_exception_flags = orig_flags | float_flag_invalid; 1440 1443 return p.sign ? 0 : max; 1441 1444 case float_class_zero: 1442 1445 return 0;