]> git.ipfire.org Git - thirdparty/qemu.git/commit
fpu/softfloat: Fix conversion from uint64 to float128
authorPetr Tesarik <ptesarik@suse.com>
Fri, 11 May 2018 07:10:52 +0000 (09:10 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 18 Jul 2018 15:47:49 +0000 (10:47 -0500)
commit781cde6d940253e511b954cbfcbaea687ed0e2ee
treee83013da1acffab574b3d43c3368ca6ecc665ecf
parente5af958dd2aac7ceb2a8313dca3074d8a99c5a7c
fpu/softfloat: Fix conversion from uint64 to float128

The significand is passed to normalizeRoundAndPackFloat128() as high
first, low second. The current code passes the integer first, so the
result is incorrectly shifted left by 64 bits.

This bug affects the emulation of s390x instruction CXLGBR (convert
from logical 64-bit binary-integer operand to extended BFP result).

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