This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v6 08/16] RISC-V: Generic <math.h> and soft-fp Routines
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Palmer Dabbelt <palmer at dabbelt dot com>
- Cc: <libc-alpha at sourceware dot org>, <patches at groups dot riscv dot org>, Andrew Waterman <andrew at sifive dot com>, <dj at redhat dot com>, Darius Rad <darius at bluespec dot com>
- Date: Fri, 26 Jan 2018 12:26:24 +0000
- Subject: Re: [PATCH v6 08/16] RISC-V: Generic <math.h> and soft-fp Routines
- Authentication-results: sourceware.org; auth=none
- References: <20180126054443.22702-1-palmer@dabbelt.com> <20180126054443.22702-9-palmer@dabbelt.com>
On Thu, 25 Jan 2018, Palmer Dabbelt wrote:
> +/* Despite not supporting trapping exceptions, we support setting
> + floating-point exception flags on hard-float targets. These are not
> + supported on soft-float targets. */
> +#ifdef __riscv_flen
> +# define EXCEPTION_TESTS_float 0
> +# define EXCEPTION_TESTS_double 0
> +# define EXCEPTION_TESTS_long_double 0
> +#endif
> +
> +/* On soft-float targets we only support the "to nearest" rounding mode. */
> +#ifdef __riscv_flen
> +# define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
> +# define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
> +# define ROUNDING_TESTS_long_double(MODE) ((MODE) == FE_TONEAREST)
> +#endif
As noted, these should both be #ifndef, to disable those tests for soft
float, whereas #ifdef would disable those tests for hard float.
--
Joseph S. Myers
joseph@codesourcery.com