Received: from eggs.gnu.org ([2001:4830:134:3::10]:47741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f84vq-0007bg-He for qemu-devel@nongnu.org; Mon, 16 Apr 2018 10:16:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f84vn-00053q-Al for qemu-devel@nongnu.org; Mon, 16 Apr 2018 10:16:34 -0400 Received: from mail.uni-paderborn.de ([131.234.142.9]:41562) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f84vm-000530-Tu for qemu-devel@nongnu.org; Mon, 16 Apr 2018 10:16:31 -0400 References: <20180416135442.30606-1-alex.bennee@linaro.org> From: Bastian Koppelmann Message-ID: Date: Mon, 16 Apr 2018 16:16:28 +0200 MIME-Version: 1.0 In-Reply-To: <20180416135442.30606-1-alex.bennee@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] fpu/softfloat: check for Inf / x or 0 / x before /0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Aurelien Jarno On 04/16/2018 03:54 PM, Alex Bennée wrote: > The re-factoring of div_floats changed the order of checking meaning > an operation like -inf/0 erroneously raises the divbyzero flag. > IEEE-754 (2008) specifies this should only occur for operations on > finite operands. > > We fix this by moving the check on the dividend being Inf/0 to before > the divisor is zero check. > > Signed-off-by: Alex Bennée > Cc: Bastian Koppelmann > --- > fpu/softfloat.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Bastian Koppelmann Tested-by: Bastian Koppelmann Cheers, Bastian