unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Cc: "H . J . Lu" <hjl.tools@gmail.com>, Joseph Myers <josmyers@redhat.com>
Subject: [PATCH 0/3] Improve x86 rounding implementation when FE_INEXACT trap is enabled
Date: Wed,  3 Apr 2024 16:39:16 -0300	[thread overview]
Message-ID: <20240403193919.1533786-1-adhemerval.zanella@linaro.org> (raw)

Some x86 rounding implementation that uses 387 raises invalid
floating point exceptions when traps are enabled. This is a GNU
extension outside the scope of the C standard.

Adhemerval Zanella (3):
  math: math: x86 ceill traps when FE_INEXACT is enabled (BZ 31600)
  math: math: x86 floor traps when FE_INEXACT is enabled (BZ 31601)
  math: math: x86 trunc traps when FE_INEXACT is enabled (BZ 31603)

 math/Makefile                                 |  7 ++
 math/test-ceil-except-2.c                     | 67 +++++++++++++++++++
 math/test-floor-except-2.c                    | 67 +++++++++++++++++++
 math/test-trunc-except-2.c                    | 67 +++++++++++++++++++
 sysdeps/i386/fpu/s_ceil.S                     | 34 ----------
 sysdeps/i386/fpu/s_ceil.c                     | 25 +++++++
 sysdeps/i386/fpu/s_ceilf.S                    | 34 ----------
 sysdeps/i386/fpu/s_ceilf.c                    | 25 +++++++
 sysdeps/i386/fpu/s_ceill.S                    | 39 -----------
 sysdeps/i386/fpu/s_floor.S                    | 34 ----------
 sysdeps/i386/fpu/s_floor.c                    | 25 +++++++
 sysdeps/i386/fpu/s_floorf.S                   | 34 ----------
 sysdeps/i386/fpu/s_floorf.c                   | 25 +++++++
 sysdeps/i386/fpu/s_floorl.S                   | 39 -----------
 sysdeps/i386/fpu/{s_trunc.S => s_trunc.c}     | 24 ++-----
 sysdeps/i386/fpu/{s_truncf.S => s_truncf.c}   | 24 ++-----
 .../fpu/s_truncl.S => x86/fpu/s_ceill.c}      | 29 ++------
 sysdeps/x86/fpu/s_floorl.c                    | 25 +++++++
 sysdeps/x86/fpu/s_nearestint_387_template.c   | 36 ++++++++++
 .../fpu/s_truncl.S => x86/fpu/s_truncl.c}     | 23 ++-----
 sysdeps/x86_64/fpu/s_ceill.S                  | 34 ----------
 sysdeps/x86_64/fpu/s_floorl.S                 | 33 ---------
 22 files changed, 394 insertions(+), 356 deletions(-)
 create mode 100644 math/test-ceil-except-2.c
 create mode 100644 math/test-floor-except-2.c
 create mode 100644 math/test-trunc-except-2.c
 delete mode 100644 sysdeps/i386/fpu/s_ceil.S
 create mode 100644 sysdeps/i386/fpu/s_ceil.c
 delete mode 100644 sysdeps/i386/fpu/s_ceilf.S
 create mode 100644 sysdeps/i386/fpu/s_ceilf.c
 delete mode 100644 sysdeps/i386/fpu/s_ceill.S
 delete mode 100644 sysdeps/i386/fpu/s_floor.S
 create mode 100644 sysdeps/i386/fpu/s_floor.c
 delete mode 100644 sysdeps/i386/fpu/s_floorf.S
 create mode 100644 sysdeps/i386/fpu/s_floorf.c
 delete mode 100644 sysdeps/i386/fpu/s_floorl.S
 rename sysdeps/i386/fpu/{s_trunc.S => s_trunc.c} (69%)
 rename sysdeps/i386/fpu/{s_truncf.S => s_truncf.c} (68%)
 rename sysdeps/{i386/fpu/s_truncl.S => x86/fpu/s_ceill.c} (63%)
 create mode 100644 sysdeps/x86/fpu/s_floorl.c
 create mode 100644 sysdeps/x86/fpu/s_nearestint_387_template.c
 rename sysdeps/{x86_64/fpu/s_truncl.S => x86/fpu/s_truncl.c} (70%)
 delete mode 100644 sysdeps/x86_64/fpu/s_ceill.S
 delete mode 100644 sysdeps/x86_64/fpu/s_floorl.S

-- 
2.34.1


             reply	other threads:[~2024-04-03 19:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 19:39 Adhemerval Zanella [this message]
2024-04-03 19:39 ` [PATCH 1/3] math: math: x86 ceill traps when FE_INEXACT is enabled (BZ 31600) Adhemerval Zanella
2024-04-03 20:03   ` H.J. Lu
2024-04-03 19:39 ` [PATCH 2/3] math: math: x86 floor traps when FE_INEXACT is enabled (BZ 31601) Adhemerval Zanella
2024-04-03 20:03   ` H.J. Lu
2024-04-03 19:39 ` [PATCH 3/3] math: math: x86 trunc traps when FE_INEXACT is enabled (BZ 31603) Adhemerval Zanella
2024-04-03 20:04   ` H.J. Lu
2024-04-04  5:27     ` Paul Zimmermann
2024-04-04 11:52       ` Adhemerval Zanella Netto

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=20240403193919.1533786-1-adhemerval.zanella@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=hjl.tools@gmail.com \
    --cc=josmyers@redhat.com \
    --cc=libc-alpha@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).