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/21973] [sparc] libm missing sqrtl compat symbol


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

--- Comment #1 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  831bbd55271eacc0190a13954bd347f0a521b096 (commit)
      from  813378e9fe17e029caf627cab76fe23eb46815fa (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=831bbd55271eacc0190a13954bd347f0a521b096

commit 831bbd55271eacc0190a13954bd347f0a521b096
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Aug 21 17:46:34 2017 +0000

    Remove SPARC sqrt wrappers (bug 21973).

    This patch removes the SPARC-specific wrappers for sqrt and sqrtf.

    These wrappers, by adding architecture-specific uses of _LIB_VERSION
    and __kernel_standard, unnecessarily complicate cleanups of libm error
    handling.  They also do not serve a useful optimization purpose.  GCC
    knows about sqrt as a built-in function, and can generate direct calls
    to a hardware square root instruction, either on its own, in the
    -fno-math-errno case, or together with an inline check for the
    argument being negative and a call to the out-of-line sqrt function
    for error handling only in that case (and has been able to do so for a
    long time).  Thus in practice the wrapper will only be called only in
    the case of negative arguments, which is not a case it is useful to
    optimize for.

    The removal of the wrappers also uncovers, and fixes, an old bug.
    32-bit SPARC libm used (checked with glibc 2.8 binaries) to have a
    sqrtl compat symbol, version GLIBC_2.0, for old binaries when sqrtl
    was an alias of sqrt (I don't have pre-glibc-2.4 binaries for SPARC to
    hand to check for the sqrtl symbol in those).  This disappeared,
    probably with:

    commit 8847f0377003fbfe9cbe951ce9f8717d74f26247
    Author: David S. Miller <davem@davemloft.net>
    Date:   Tue Feb 28 22:37:58 2012 -0800

        Add sparc optimized sqrt{,f}.

    Removing the wrappers brings back the generic ldbl-opt logic for
    creating such compat symbols, and so restores the compat symbol that
    should be there.  This could of course also be fixed in the wrappers -
    but as noted above, the wrappers are optimizing a case it's not useful
    to optimize, so the bug of the missing compat symbol serves to
    illustrate the risks involved with the extra complexity of
    architecture-specific function versions where not needed.

    Tested with build-many-glibcs.py.

        [BZ #21973]
        * sysdeps/sparc/sparc32/fpu/w_sqrt_compat.S: Remove file.
        * sysdeps/sparc/sparc32/fpu/w_sqrtf_compat.S: Likewise.
        * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat-vis3.S:
        Likewise.
        * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat.S:
        Likewise.
        * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat-vis3.S:
        Likewise.
        * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat.S:
        Likewise.
        * sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt_compat.S : Likewise.
        * sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf_compat.S: Likewise.
        * sysdeps/sparc/sparc64/fpu/w_sqrt_compat.S: Likewise.
        * sysdeps/sparc/sparc64/fpu/w_sqrtf_compat.S: Likewise.
        * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Add
        GLIBC_2.0 sqrtl symbol.

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

Summary of changes:
 ChangeLog                                          |   18 +++++++
 sysdeps/sparc/sparc32/fpu/w_sqrt_compat.S          |   54 --------------------
 sysdeps/sparc/sparc32/fpu/w_sqrtf_compat.S         |   52 -------------------
 .../sparc/sparc32/sparcv9/fpu/multiarch/Makefile   |    1 -
 .../sparcv9/fpu/multiarch/w_sqrt_compat-vis3.S     |   50 ------------------
 .../sparc32/sparcv9/fpu/multiarch/w_sqrt_compat.S  |   12 ----
 .../sparcv9/fpu/multiarch/w_sqrtf_compat-vis3.S    |   48 -----------------
 .../sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat.S |   12 ----
 sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt_compat.S  |   52 -------------------
 sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf_compat.S |   51 ------------------
 sysdeps/sparc/sparc64/fpu/w_sqrt_compat.S          |   49 ------------------
 sysdeps/sparc/sparc64/fpu/w_sqrtf_compat.S         |   49 ------------------
 sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist |    1 +
 13 files changed, 19 insertions(+), 430 deletions(-)
 delete mode 100644 sysdeps/sparc/sparc32/fpu/w_sqrt_compat.S
 delete mode 100644 sysdeps/sparc/sparc32/fpu/w_sqrtf_compat.S
 delete mode 100644
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat-vis3.S
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt_compat.S
 delete mode 100644
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat-vis3.S
 delete mode 100644
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf_compat.S
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt_compat.S
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf_compat.S
 delete mode 100644 sysdeps/sparc/sparc64/fpu/w_sqrt_compat.S
 delete mode 100644 sysdeps/sparc/sparc64/fpu/w_sqrtf_compat.S

-- 
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]