From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vy0FC-0004KD-BT for qemu-devel@nongnu.org; Tue, 31 Dec 2013 09:24:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vy0F7-0004qr-LM for qemu-devel@nongnu.org; Tue, 31 Dec 2013 09:24:30 -0500 Received: from mail-pb0-x232.google.com ([2607:f8b0:400e:c01::232]:43538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vy0F7-0004qn-DY for qemu-devel@nongnu.org; Tue, 31 Dec 2013 09:24:25 -0500 Received: by mail-pb0-f50.google.com with SMTP id rr13so12747370pbb.9 for ; Tue, 31 Dec 2013 06:24:24 -0800 (PST) Sender: Richard Henderson Message-ID: <52C2D394.5080504@twiddle.net> Date: Tue, 31 Dec 2013 06:24:20 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1388496958-3542-1-git-send-email-peter.maydell@linaro.org> <1388496958-3542-11-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1388496958-3542-11-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 10/22] softfloat: Fix float64_to_uint32_round_to_zero List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Tom Musta , Peter Crosthwaite , patches@linaro.org, Aurelien Jarno , Michael Matz , Alexander Graf , Claudio Fontana , Dirk Mueller , Will Newton , Laurent Desnogues , =?ISO-8859-1?Q?Alex_Benn=E9e?= , kvmarm@lists.cs.columbia.edu, Christoffer Dall On 12/31/2013 05:35 AM, Peter Maydell wrote: > From: Tom Musta > > The float64_to_uint32_round_to_zero routine is incorrect. > > For example, the following test pattern: > > 425F81378DC0CD1F / 0x1.f81378dc0cd1fp+38 > > will erroneously set the inexact flag. > > This patch re-implements the routine to use the float64_to_uint64_round_to_zero > routine. If saturation occurs we ignore any flags set by the > conversion function and raise only Invalid. > > This contribution can be licensed under either the softfloat-2a or -2b > license. > > Signed-off-by: Tom Musta > Message-id: 1387397961-4894-6-git-send-email-tommusta@gmail.com > Signed-off-by: Peter Maydell > --- > fpu/softfloat.c | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) Reviewed-by: Richard Henderson r~