public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: newlib@sourceware.org
Subject: [PATCH 0/2] libm: Changes to errno and math_errhandling
Date: Mon,  3 Aug 2020 10:55:02 -0700	[thread overview]
Message-ID: <20200803175504.844738-1-keithp@keithp.com> (raw)

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.



             reply	other threads:[~2020-08-03 17:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 17:55 Keith Packard [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200803175504.844738-1-keithp@keithp.com \
    --to=keithp@keithp.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).