From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1TImMR-0000wm-7V for mharc-qemu-trivial@gnu.org; Mon, 01 Oct 2012 16:13:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TImMN-0000lZ-Ii for qemu-trivial@nongnu.org; Mon, 01 Oct 2012 16:13:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TImMM-0002VW-Ga for qemu-trivial@nongnu.org; Mon, 01 Oct 2012 16:12:59 -0400 Received: from hall.aurel32.net ([88.191.126.93]:37353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TImMK-0002VC-7u; Mon, 01 Oct 2012 16:12:56 -0400 Received: from [2001:470:d4ed:0:ea11:32ff:fea1:831a] (helo=ohm.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1TImMJ-0005s8-Lb; Mon, 01 Oct 2012 22:12:55 +0200 Received: from aurel32 by ohm.aurel32.net with local (Exim 4.80) (envelope-from ) id 1TImMI-0000jN-Gy; Mon, 01 Oct 2012 22:12:54 +0200 Date: Mon, 1 Oct 2012 22:12:54 +0200 From: Aurelien Jarno To: Peter Maydell 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> X-Mailer: Mutt 1.5.21 (2010-09-15) User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.126.93 Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] fpu/softfloat.c: Remove pointless shift of always-zero value X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 20:13:01 -0000 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