summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorRichard Henderson2018-05-10 19:10:58 +0200
committerPeter Maydell2018-05-10 19:10:58 +0200
commit88808a022c06f98d81cd3f2d105a5734c5614839 (patch)
treec111f273409068f6aa239cd3fc8cdd136f71bf53 /include/exec
parenttarget/arm: Implement vector shifted FCVT for fp16 (diff)
downloadqemu-88808a022c06f98d81cd3f2d105a5734c5614839.tar.gz
qemu-88808a022c06f98d81cd3f2d105a5734c5614839.tar.xz
qemu-88808a022c06f98d81cd3f2d105a5734c5614839.zip
target/arm: Fix float16 to/from int16
The instruction "ucvtf v0.4h, v04h, #2", with input 0x8000u, overflows the intermediate float16 to infinity before we have a chance to scale the output. Use float64 as the intermediate type so that no input argument (uint32_t in this case) can overflow or round before scaling. Given the declared argument, the signed int32_t function has the same problem. When converting from float16 to integer, using u/int32_t instead of u/int16_t means that the bounding is incorrect. Cc: qemu-stable@nongnu.org Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20180502221552.3873-4-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/exec')
0 files changed, 0 insertions, 0 deletions