On Wed, 24 Jan 2018, Palmer Dabbelt wrote:
FIXME: add ieee745/soft-fp via a riscv/soft-fp directory.
You need to remove that FIXME (and, in general, update patch descriptions
when sending new versions of a patch series - though in this case it
doesn't matter so much, as it makes sense for the final commit of a new
port to go in a single commit, not lots of separate commits of different
pieces that don't work without each other, so an overall commit message is
what's needed at that point anyway).
+/* Despite not supporting trapping exceptions, we support setting
+ floating-point exception flags on hard-float targets. These are not
+ supported on soft-float targets. */
+#if __riscv_flen == 0
+#define EXCEPTION_TESTS_float 0
+#define EXCEPTION_TESTS_double 0
+#endif
Missing preprocessor indentation, "# define".
+/* We don't support the Q extension yet, so long double is always soft float
+ * and therefor doesn't support exceptions. */
+#define EXCEPTION_TESTS_long_double 0
That's not accurate. The EXCEPTION_TESTS_long_double definition should be
inside the same conditional as the others - the RISC-V sfp-machine.h, in
both glibc and libgcc, already handles making software floating-point
types use the hardware exceptions and rounding modes when those exist.
(I expect that if you completed a soft-float test run you'd find that
ROUNDING_TESTS_* definitions, similar to those on other ports, are also
needed inside that conditional, to disable tests of rounding modes other
than FE_TONEAREST for soft-float.)