From 4be8eeacb9f2b01ad98747ad88e54a7feabc664c Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Mon, 24 Sep 2012 17:28:35 +0100 Subject: fpu/softfloat.c: Remove pointless shift of always-zero value In float16_to_float32, when returning an infinity, just pass zero as the mantissa argument to packFloat32(), rather than shifting a value which we know must be zero. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- fpu/softfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fpu/softfloat.c') diff --git a/fpu/softfloat.c b/fpu/softfloat.c index b29256a8eb..01a28cab1a 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -3007,7 +3007,7 @@ float32 float16_to_float32(float16 a, flag ieee STATUS_PARAM) if (aSig) { return commonNaNToFloat32(float16ToCommonNaN(a STATUS_VAR) STATUS_VAR); } - return packFloat32(aSign, 0xff, aSig << 13); + return packFloat32(aSign, 0xff, 0); } if (aExp == 0) { int8 shiftCount; -- cgit v1.2.3