Re: [PATCH] Disable tests that require fesetround() on platforms without it

2022-04-28 Thread Palmer Dabbelt
On Thu, 28 Apr 2022 15:22:37 PDT (-0700), jos...@codesourcery.com wrote: On Thu, 28 Apr 2022, Palmer Dabbelt wrote: On Thu, 28 Apr 2022 15:12:39 PDT (-0700), jos...@codesourcery.com wrote: > On Thu, 28 Apr 2022, Palmer Dabbelt wrote: > > > +proc check_effective_target_fenv_setround {} { > > +

Re: [PATCH] Disable tests that require fesetround() on platforms without it

2022-04-28 Thread Joseph Myers
On Thu, 28 Apr 2022, Palmer Dabbelt wrote: > On Thu, 28 Apr 2022 15:12:39 PDT (-0700), jos...@codesourcery.com wrote: > > On Thu, 28 Apr 2022, Palmer Dabbelt wrote: > > > > > +proc check_effective_target_fenv_setround {} { > > > + return [check_runtime fenv_setround { > > > +#include > > >

Re: [PATCH] Disable tests that require fesetround() on platforms without it

2022-04-28 Thread Palmer Dabbelt
On Thu, 28 Apr 2022 15:12:39 PDT (-0700), jos...@codesourcery.com wrote: On Thu, 28 Apr 2022, Palmer Dabbelt wrote: +proc check_effective_target_fenv_setround {} { + return [check_runtime fenv_setround { +#include +#include +int +main (void) +{ + if (fesetround (1) =

Re: [PATCH] Disable tests that require fesetround() on platforms without it

2022-04-28 Thread Joseph Myers
On Thu, 28 Apr 2022, Palmer Dabbelt wrote: > +proc check_effective_target_fenv_setround {} { > + return [check_runtime fenv_setround { > +#include > +#include > +int > +main (void) > +{ > + if (fesetround (1) == 0) There is no reason to expect that 1 is a valid argumen

[PATCH] Disable tests that require fesetround() on platforms without it

2022-04-28 Thread Palmer Dabbelt
Some tests check for fenv and then proceed to use fesetround() directly, but some platforms (at least RISC-V soft-float) have fenv but don't support rounding modes. This adds a DG check that fesetround() actually functions, which is then used by all the tests that call fesetround() explicitly. gc