Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1694734

Re: [PATCH v3 05/16] MIPS: math-emu: <MAX|MAXA|MIN|MINA>.<D|S>: Fix quiet NaN propagation

Path csiph.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From James Hogan <james.hogan@imgtec.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 05/16] MIPS: math-emu: <MAX|MAXA|MIN|MINA>.<D|S>: Fix quiet NaN propagation
Date Mon, 24 Jul 2017 15:50:01 +0200
Message-ID <u6LUd-5yD-3@gated-at.bofh.it> (permalink)
References <u5GWB-5Tl-3@gated-at.bofh.it> <u5GWB-5Tl-1@gated-at.bofh.it> <u5HpE-62U-23@gated-at.bofh.it> <u6LKz-5uV-43@gated-at.bofh.it>
X-Original-To Aleksandar Markovic <Aleksandar.Markovic@imgtec.com>
X-PGP-Universal processed; by imgpgp01.kl.imgtec.org on Mon, 24 Jul 2017 15:56:30 +0100
MIME-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7TFYKOoUMIL+0w8y"
Content-Disposition inline
User-Agent Mutt/1.5.24 (2015-08-30)
X-Originating-IP [192.168.154.110]
X-Esg-Encrypt-Tag 3d264444
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 95
Organization linux.* mail to news gateway
X-Original-Cc Aleksandar Markovic <aleksandar.markovic@rt-rk.com>, "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, Miodrag Dinic <Miodrag.Dinic@imgtec.com>, Goran Ferenc <Goran.Ferenc@imgtec.com>, Douglas Leung <Douglas.Leung@imgtec.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Paul Burton <Paul.Burton@imgtec.com>, Petar Jovanovic <Petar.Jovanovic@imgtec.com>, Raghu Gandham <Raghu.Gandham@imgtec.com>, Ralf Baechle <ralf@linux-mips.org>
X-Original-Date Mon, 24 Jul 2017 14:45:15 +0100
X-Original-Message-ID <20170724134515.GV6973@jhogan-linux.le.imgtec.org>
X-Original-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> <EF5FA6C3467F85449672C3E735957B85015D9C3A72@BADAG02.ba.imgtec.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1694734

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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_fmax.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, union ieee754dp y)
> > >       case CLPAIR(IEEE754_CLASS_SNAN, IEEE754_CLASS_INF):
> > >               return ieee754dp_nanxcpt(x);
> > >
> > > +     case CLPAIR(IEEE754_CLASS_QNAN, IEEE754_CLASS_QNAN):
> > > +             return x;
> > 
> > couldn't the above...
> > 
> > > +
> > >       /* 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, union ieee754dp y)
> > 
> > ... go somewhere around here and fall through to the existing return x
> > case?
> > 
> 
> It could, but at the expense of code clarity and/or logical grouping of special cases,
> which after this patch looks like:
> 
>                . . .
>                  |
>   case of both inputs qNaN
>                  |
>   case of only x input qNaN
>                  |
>   case of only y input qNaN
>                  |
>                . . .
> 
> 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 appropriate
> places:
> 
> 	/*
> 	 * Quiet NaN handling
> 	 */
> 	/* The case of both inputs quiet NaNs */
>    . . .
> 	/* The cases of exactly one input quiet NaN */
> 
> Unfortunately, the code segment for handling of sNaN and infinity inputs do
> not follow the organization that I proposed. However, I think that my proposal
> 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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v3 05/16] MIPS: math-emu: <MAX|MAXA|MIN|MINA>.<D|S>: Fix quiet NaN propagation Aleksandar Markovic <aleksandar.markovic@rt-rk.com> - 2017-07-21 16:20 +0200
  Re: [PATCH v3 05/16] MIPS: math-emu: <MAX|MAXA|MIN|MINA>.<D|S>: Fix  quiet NaN propagation James Hogan <james.hogan@imgtec.com> - 2017-07-21 16:50 +0200
    RE: [PATCH v3 05/16] MIPS: math-emu: <MAX|MAXA|MIN|MINA>.<D|S>: Fix  quiet NaN propagation Aleksandar Markovic <Aleksandar.Markovic@imgtec.com> - 2017-07-24 15:40 +0200
      Re: [PATCH v3 05/16] MIPS: math-emu: <MAX|MAXA|MIN|MINA>.<D|S>: Fix  quiet NaN propagation James Hogan <james.hogan@imgtec.com> - 2017-07-24 15:50 +0200

csiph-web