summary refs log tree commit diff stats
path: root/scripts/qapi/types.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-05-15 14:58:42 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-05-15 14:58:42 +0100
commit333583757c5e910b040bef793974773635ce1918 (patch)
treea1245074df3397ae29e4a00b732740ca945b9a06 /scripts/qapi/types.py
parenta5a5f5e2e437db6c19164b734f838a7bf9e0c5ec (diff)
downloadfocaccia-qemu-333583757c5e910b040bef793974773635ce1918.tar.gz
focaccia-qemu-333583757c5e910b040bef793974773635ce1918.zip
fpu/softfloat: Don't set Invalid for float-to-int(MAXINT)
In float-to-integer conversion, if the floating point input
converts exactly to the largest or smallest integer that
fits in to the result type, this is not an overflow.
In this situation we were producing the correct result value,
but were incorrectly setting the Invalid flag.
For example for Arm A64, "FCVTAS w0, d0" on an input of
0x41dfffffffc00000 should produce 0x7fffffff and set no flags.

Fix the boundary case to take the right half of the if()
statements.

This fixes a regression from 2.11 introduced by the softfloat
refactoring.

Cc: qemu-stable@nongnu.org
Fixes: ab52f973a50
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180510140141.12120-1-peter.maydell@linaro.org
Diffstat (limited to 'scripts/qapi/types.py')
0 files changed, 0 insertions, 0 deletions