This is the mail archive of the glibc-bugs@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]

[Bug math/15479] ceil, floor and round and trunc raise inexact exception


https://sourceware.org/bugzilla/show_bug.cgi?id=15479

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  5ff81530dd14552a48a8fcb119e5867a1b504cc6 (commit)
      from  7cfcb778c9cc6ad3c3b5ac2dbb2308e81ba3235b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5ff81530dd14552a48a8fcb119e5867a1b504cc6

commit 5ff81530dd14552a48a8fcb119e5867a1b504cc6
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue May 24 21:11:18 2016 +0000

    Do not raise "inexact" from x86_64 SSE4.1 ceil, floor (bug 15479).

    Continuing fixes for ceil and floor functions not to raise the
    "inexact" exception, this patch fixes the x86_64 SSE4.1 versions.  The
    roundss / roundsd instructions take an immediate operand that
    determines the rounding mode and whether to raise "inexact"; this just
    needs bit 3 set to disable "inexact", which this patch does.

    Remark: we don't have an SSE4.1 version of trunc / truncf (using this
    instruction with operand 11); I'd expect one to make sense, but of
    course it should be benchmarked against the existing C code.  I'll
    file a bug in Bugzilla for the lack of such a version.

    Tested for x86_64.

        [BZ #15479]
        * sysdeps/x86_64/fpu/multiarch/s_ceil.S (__ceil_sse41): Set bit 3
        of immediate operand to rounding instruction.
        * sysdeps/x86_64/fpu/multiarch/s_ceilf.S (__ceilf_sse41):
        Likewise.
        * sysdeps/x86_64/fpu/multiarch/s_floor.S (__floor_sse41):
        Likewise.
        * sysdeps/x86_64/fpu/multiarch/s_floorf.S (__floorf_sse41):
        Likewise.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                               |   12 ++++++++++++
 sysdeps/x86_64/fpu/multiarch/s_ceil.S   |    2 +-
 sysdeps/x86_64/fpu/multiarch/s_ceilf.S  |    2 +-
 sysdeps/x86_64/fpu/multiarch/s_floor.S  |    2 +-
 sysdeps/x86_64/fpu/multiarch/s_floorf.S |    2 +-
 5 files changed, 16 insertions(+), 4 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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