From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCfpS-0005Ai-CY for qemu-devel@nongnu.org; Sat, 08 Oct 2011 18:57:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCfpR-0004nE-59 for qemu-devel@nongnu.org; Sat, 08 Oct 2011 18:57:14 -0400 Received: from mail-ww0-f53.google.com ([74.125.82.53]:35613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCfpR-0004mv-0o for qemu-devel@nongnu.org; Sat, 08 Oct 2011 18:57:13 -0400 Received: by wwg14 with SMTP id 14so6509628wwg.10 for ; Sat, 08 Oct 2011 15:57:11 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1317652087-27288-1-git-send-email-christophe.lyon@st.com> References: <1317652087-27288-1-git-send-email-christophe.lyon@st.com> Date: Sat, 8 Oct 2011 23:57:11 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] rsqrte_f32: No need to copy sign bit. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christophe Lyon Cc: qemu-devel@nongnu.org On 3 October 2011 15:28, Christophe Lyon wrote: > Indeed, the result is known to be always positive. > - =C2=A0 =C2=A0val =3D ((val64 >> 63) =C2=A0& 0x80000000) > - =C2=A0 =C2=A0 =C2=A0 =C2=A0| ((result_exp & 0xff) << 23) > + =C2=A0 =C2=A0val =3D ((result_exp & 0xff) << 23) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 | ((val64 >> 29) =C2=A0& 0x7fffff); > =C2=A0 =C2=A0 return make_float32(val); So we weren't generating incorrect results, we were just doing slightly more work than we really needed, right? I'm curious what prompted this patch :-) -- PMM