softfloat: fix return type of roundAndPackFloat16

The roundAndPackFloat16 function should return a float16 value, not a
float32 one. Fix that.

Backports commit 7ceac86f49b564954f5bde477c4281f407be1399 from qemu
This commit is contained in:
Aurelien Jarno 2018-02-19 00:36:35 -05:00 committed by Lioncash
parent c8220d5aaf
commit 5c1abe1b1b
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -3333,7 +3333,7 @@ static float16 packFloat16(flag zSign, int_fast16_t zExp, uint16_t zSig)
| Binary Floating-Point Arithmetic.
*----------------------------------------------------------------------------*/
static float32 roundAndPackFloat16(flag zSign, int_fast16_t zExp,
static float16 roundAndPackFloat16(flag zSign, int_fast16_t zExp,
uint32_t zSig, flag ieee, float_status *status)
{
int maxexp = ieee ? 29 : 30;