Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754421AbdGXNp0 (ORCPT ); Mon, 24 Jul 2017 09:45:26 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:16260 "EHLO imgpgp01.kl.imgtec.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753107AbdGXNpR (ORCPT ); Mon, 24 Jul 2017 09:45:17 -0400 X-PGP-Universal: processed; by imgpgp01.kl.imgtec.org on Mon, 24 Jul 2017 15:56:30 +0100 Date: Mon, 24 Jul 2017 14:45:15 +0100 From: James Hogan To: Aleksandar Markovic CC: Aleksandar Markovic , "linux-mips@linux-mips.org" , Miodrag Dinic , Goran Ferenc , Douglas Leung , "linux-kernel@vger.kernel.org" , Paul Burton , Petar Jovanovic , Raghu Gandham , Ralf Baechle Subject: Re: [PATCH v3 05/16] MIPS: math-emu: .: Fix quiet NaN propagation Message-ID: <20170724134515.GV6973@jhogan-linux.le.imgtec.org> References: <1500646206-2436-1-git-send-email-aleksandar.markovic@rt-rk.com> <1500646206-2436-6-git-send-email-aleksandar.markovic@rt-rk.com> <20170721144504.GJ6973@jhogan-linux.le.imgtec.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7TFYKOoUMIL+0w8y" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [192.168.154.110] X-ESG-ENCRYPT-TAG: 3d264444 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3126 Lines: 95 --7TFYKOoUMIL+0w8y Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Aleksandar, On Mon, Jul 24, 2017 at 02:36:05PM +0100, Aleksandar Markovic wrote: > > > diff --git a/arch/mips/math-emu/dp_fmax.c b/arch/mips/math-emu/dp_fma= x.c > > > index fd71b8d..567fc33 100644 > > > --- a/arch/mips/math-emu/dp_fmax.c > > > +++ b/arch/mips/math-emu/dp_fmax.c > > > @@ -47,6 +47,9 @@ union ieee754dp ieee754dp_fmax(union ieee754dp x, u= nion ieee754dp y) > > > case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_INF): > > > return ieee754dp_nanxcpt(x); > > > > > > + case CLPAIR(IEEE754_CLASS_QNAN, IEEE754_CLASS_QNAN): > > > + return x; > >=20 > > couldn't the above... > >=20 > > > + > > > /* numbers are preferred to NaNs */ > > > case CLPAIR(IEEE754_CLASS_ZERO, IEEE754_CLASS_QNAN): > > > case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_QNAN): > > > @@ -54,7 +57,6 @@ union ieee754dp ieee754dp_fmax(union ieee754dp x, u= nion ieee754dp y) > >=20 > > ... go somewhere around here and fall through to the existing return x > > case? > >=20 >=20 > It could, but at the expense of code clarity and/or logical grouping of s= pecial cases, > which after this patch looks like: >=20 > . . . > | > case of both inputs qNaN > | > case of only x input qNaN > | > case of only y input qNaN > | > . . . >=20 > If you agree, I suggest keeping the code the same as currently proposed in > this patch, except that the following comments should be added in appropr= iate > places: >=20 > /* > * Quiet NaN handling > */ > /* The case of both inputs quiet NaNs */ > . . . > /* The cases of exactly one input quiet NaN */ >=20 > Unfortunately, the code segment for handling of sNaN and infinity inputs = do > not follow the organization that I proposed. However, I think that my pro= posal > for case organization is the superior one - therefore I intend to keep it= in v4, > unless you tell me not to do so. Okay, I don't object. Thanks James --7TFYKOoUMIL+0w8y Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd80NauSabkiESfLYbAtpk944dnoFAll1+esACgkQbAtpk944 dnrSgw//XpLaZjf7mXHsG94fjZeki7JT2BrpfFlBbsV91XcgjVu+27O+kjW7Tgz9 5wc+bVEh4JuEYkdulEdMM4cWZgnlX0O3epuIakI+DNYs0w5dhmGB9IIgmxqOo33J SJPA982HghaT3jB2AfiXbfHpg7WAfa7jYd44e3gn3w6zithtWpouWyJbvsM4HEF7 b6EBE4P6nK+drH6T93hraEbh9Wh1rkGCbWfc5lxp/XHyQJ0QmF3cRaa6duDiYpWw dV7VuiN3GLziXb9BJelrE1uLdybeNGOkB9mOZV83UY+EWYQzkfO/lnHgz82RRL1R a7JJ/OxpaeRdlFGXPWfeZEo8ArlbCxR+nej+uH6FnOhRnFHxMw2ESHNTrtcwxE5D Z9VlFBIowt4mLzYsXRFXA//fVgiEvevDIxzYmb9ZEdXF+NB5TEfSlglMAMiqlcG6 60uq8ILMV2GhwVAHMatjlYYyXmMEpJKetd1qu37e5nhXSUFlUwo2Ii7/96kBE8de OKvHOAUlTGjwom1KLwSEywe+rfX1+zjMJlILPWcfY07x8jBR9pmnGUuucykZERbJ TsZAqO+hr6pyOHIxVfiRFpXt6WDOvTyFG59Ke81n/iNz81fN2gDGbRxSXDkkkEXg 86rsNBee7Q1pRtCNYhbMg3fBx08emnRC8FIRfkL1k3pTu2ZC7fA= =T9xx -----END PGP SIGNATURE----- --7TFYKOoUMIL+0w8y--