public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] libm: Changes to errno and math_errhandling
@ 2020-08-03 17:55 Keith Packard
  2020-08-03 17:55 ` [PATCH 1/2] libm/common: Set WANT_ERRNO based on _IEEE_LIBM value Keith Packard
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Keith Packard @ 2020-08-03 17:55 UTC (permalink / raw)
  To: newlib

Here are a couple of related patches that adjust errno and exception
configuration stuff.

The first patch makes libm/common use the same configuration value as
libm/math to decide whether to set errno when exceptions occur. With
that, users of libm/math get consistent errno reporting across the
whole math library when using the normal API. When errno is enabled,
calls to some __ieee754 symbols may end up setting errno still.

The second patch sets the math_errhandling value based on library and
hardware configuration so that applications can tell whether
exceptions and errno are supported. This requires configuration on a
per-target basis in machine/ieeefp.h; I've added configuration for
arm, aarch64, x86, x86_64 and RISC-V. I think this could be automated.

Reporting on whether exceptions are supported suffers from
inconsistent exception support for hardware that uses a mixture of
hardware and software for floating point operations. I haven't found
any standards-conformant mechanism to use though.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-04 18:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 17:55 [PATCH 0/2] libm: Changes to errno and math_errhandling Keith Packard
2020-08-03 17:55 ` [PATCH 1/2] libm/common: Set WANT_ERRNO based on _IEEE_LIBM value Keith Packard
2020-08-03 17:55 ` [PATCH 2/2] libm: Set math_errhandling to match library and hardware Keith Packard
2020-08-04  8:57   ` Corinna Vinschen
2020-08-04 18:11     ` Keith Packard
2020-08-04 17:31 ` [PATCH 0/2] libm: Changes to errno and math_errhandling Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).