From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0F2P-0005pH-7R for qemu-devel@nongnu.org; Mon, 06 Jan 2014 13:36:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0F2K-0006SM-4S for qemu-devel@nongnu.org; Mon, 06 Jan 2014 13:36:33 -0500 Received: from mail-qe0-x229.google.com ([2607:f8b0:400d:c02::229]:38454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0F2J-0006SG-U1 for qemu-devel@nongnu.org; Mon, 06 Jan 2014 13:36:28 -0500 Received: by mail-qe0-f41.google.com with SMTP id gh4so19256712qeb.0 for ; Mon, 06 Jan 2014 10:36:27 -0800 (PST) Sender: Richard Henderson Message-ID: <52CAF7A6.8050301@twiddle.net> Date: Mon, 06 Jan 2014 10:36:22 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1389013881-15726-1-git-send-email-peter.maydell@linaro.org> <1389013881-15726-17-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1389013881-15726-17-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 16/24] softfloat: Add support for ties-away rounding 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, 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 01/06/2014 05:11 AM, Peter Maydell wrote: > IEEE754-2008 specifies a new rounding mode: > > "roundTiesToAway: the floating-point number nearest to the infinitely > precise result shall be delivered; if the two nearest floating-point > numbers bracketing an unrepresentable infinitely precise result are > equally near, the one with larger magnitude shall be delivered." > > Implement this new mode (it is needed for ARM). The general principle > is that the required code is exactly like the ties-to-even code, > except that we do not need to do the "in case of exact tie clear LSB > to round-to-even", because the rounding operation naturally causes > the exact tie to round up in magnitude. > > Signed-off-by: Peter Maydell > --- > fpu/softfloat.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ > include/fpu/softfloat.h | 3 ++- > 2 files changed, 56 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~