This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v6 08/16] RISC-V: Generic <math.h> and soft-fp Routines


On Fri, 26 Jan 2018 04:26:24 PST (-0800), joseph@codesourcery.com wrote:
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.

Sorry about that, this will be fixed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]