Re: [PATCH] libgcc2.c: Correct DI/TI -> SF/DF conversions

2019-01-24 Thread Joseph Myers
On Thu, 24 Jan 2019, Christophe Lyon wrote: > On Thu, 24 Jan 2019 at 15:31, Joseph Myers wrote: > > > > On Thu, 24 Jan 2019, Christophe Lyon wrote: > > > > > The attached small patch adds > > > /* { dg-require-effective-target fenv_exceptions } */ > > > to them. > > > > It should be a *new*

Re: [PATCH] libgcc2.c: Correct DI/TI -> SF/DF conversions

2019-01-24 Thread Dominique d'Humières
The test gcc.dg/torture/fp-int-convert-timode-3.c fails on darwin: the results are -0x1p+127 -0x1p+127 TIA Dominique

Re: [PATCH] libgcc2.c: Correct DI/TI -> SF/DF conversions

2019-01-24 Thread Christophe Lyon
On Thu, 24 Jan 2019 at 15:31, Joseph Myers wrote: > > On Thu, 24 Jan 2019, Christophe Lyon wrote: > > > The attached small patch adds > > /* { dg-require-effective-target fenv_exceptions } */ > > to them. > > It should be a *new* effective-target, because these tests are nothing to > do with

Re: [PATCH] libgcc2.c: Correct DI/TI -> SF/DF conversions

2019-01-24 Thread Joseph Myers
On Thu, 24 Jan 2019, Christophe Lyon wrote: > The attached small patch adds > /* { dg-require-effective-target fenv_exceptions } */ > to them. It should be a *new* effective-target, because these tests are nothing to do with exceptions; they're about rounding modes (but actually you only need

Re: [PATCH] libgcc2.c: Correct DI/TI -> SF/DF conversions

2019-01-24 Thread Christophe Lyon
On Wed, 23 Jan 2019 at 22:14, H.J. Lu wrote: > > On Wed, Jan 23, 2019 at 12:50 PM Joseph Myers wrote: > > > > On Wed, 23 Jan 2019, H.J. Lu wrote: > > > > > + fesetround (FE_DOWNWARD); > > > + float fs = s128; > > > + if (fs != -0x1p+127) > > > +abort (); > > > + double ds = s128; > > > +

Re: [PATCH] libgcc2.c: Correct DI/TI -> SF/DF conversions

2019-01-23 Thread H.J. Lu
f988a6e34aed324f13b777af82deb Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 22 Jan 2019 18:55:35 -0800 Subject: [PATCH] libgcc2.c: Correct DI/TI -> SF/DF conversions FSTYPE FUNC (DWtype u) in libgcc2.c, which converts DI/TI to SF/DF, has /* No leading bits means u == minimu

Re: [PATCH] libgcc2.c: Correct DI/TI -> SF/DF conversions

2019-01-23 Thread Joseph Myers
On Wed, 23 Jan 2019, H.J. Lu wrote: > + fesetround (FE_DOWNWARD); > + float fs = s128; > + if (fs != -0x1p+127) > +abort (); > + double ds = s128; > + if (ds != -0x1p+127) > +abort (); This definitely needs #ifdef FE_DOWNWARD; even just limited to glibc configurations, there are

[PATCH] libgcc2.c: Correct DI/TI -> SF/DF conversions

2019-01-23 Thread H.J. Lu
FSTYPE FUNC (DWtype u) in libgcc2.c, which converts DI/TI to SF/DF, has /* No leading bits means u == minimum. */ if (count == 0) return -(Wtype_MAXp1_F * (Wtype_MAXp1_F / 2)); in the third case (where actually count == 0 only means the high part is minimum). It should be: /* No