From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TImML-0000kc-HD for qemu-devel@nongnu.org; Mon, 01 Oct 2012 16:12:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TImMK-0002VG-E4 for qemu-devel@nongnu.org; Mon, 01 Oct 2012 16:12:57 -0400 Date: Mon, 1 Oct 2012 22:12:54 +0200 From: Aurelien Jarno Message-ID: <20121001201254.GH4623@ohm.aurel32.net> References: <1348504115-13203-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1348504115-13203-1-git-send-email-peter.maydell@linaro.org> Subject: Re: [Qemu-devel] [PATCH] fpu/softfloat.c: Remove pointless shift of always-zero value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org On Mon, Sep 24, 2012 at 05:28:35PM +0100, Peter Maydell wrote: > 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 > --- > Spotted by the clang static analyzer. This brings this code into line with > the other float-to-float conversion functions and was probably a harmless > cut-n-paste error from the normal-return codepath. > > fpu/softfloat.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fpu/softfloat.c b/fpu/softfloat.c > index b29256a..01a28ca 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; Thanks, applied. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net