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).

Backports commit 6603d50648901e8b9e6d66ec1142accf0b1df1e6 from qemu
This commit is contained in:
Petr Tesarik 2018-05-19 21:55:46 -04:00 committed by Lioncash
parent 5091ebe6fb
commit d1d09f384e
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -3148,7 +3148,7 @@ float128 uint64_to_float128(uint64_t a, float_status *status)
float128 zero = {0};
return zero;
}
return normalizeRoundAndPackFloat128(0, 0x406E, a, 0, status);
return normalizeRoundAndPackFloat128(0, 0x406E, 0, a, status);
}