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 string/5806] wrong comment in strlen() and other functions


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

--- Comment #6 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, azanella/generic-strings has been created
        at  72aa7602bb7fc7e54aaf3f1f49a18122676e138b (commit)

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

commit 72aa7602bb7fc7e54aaf3f1f49a18122676e138b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Feb 21 17:14:16 2017 -0300

    sh: Add string-fzb.h and string-fzi.h

    Use the SH cmp/str on has_{zero,eq,zero_eq} and avoid use builtin
    count leading/trailing zero which for SH calls a libgcc function
    (expanding it to direct byte testing is better than a function call).

        * sysdeps/sh/string-fzb.h: New file.
        * sysdeps/sh/string-fzi.h: Likewise.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0ce10e49871b2d759f6115bb1355883c31bd5959

commit 0ce10e49871b2d759f6115bb1355883c31bd5959
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:26:18 2017 -0200

    powerpc: Add string-fza.h

    While ppc has the more important string functions in assembly,
    there are still a few generic routines used.

    Use the Power 6 CMPB insn for testing of zeros.

        * sysdeps/powerpc/power6/string-fza.h: New file.
        * sysdeps/powerpc/powerpc32/power6/string-fza.h: New file.
        * sysdeps/powerpc/powerpc64/power6/string-fza.h: New file.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=55ddf7c70da6a8ae23507c41a34d00a127bc1308

commit 55ddf7c70da6a8ae23507c41a34d00a127bc1308
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:24:23 2017 -0200

    arm: Add string-fza.h

    While arm has the more important string functions in assembly,
    there are still a few generic routines used.

    Use the UQSUB8 insn for testing of zeros.

        * sysdeps/arm/armv6t2/string-fza.h: New file.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bef385336624e51985182dc9401c702fdfc73817

commit bef385336624e51985182dc9401c702fdfc73817
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:23:27 2017 -0200

    alpha: Add string-fzb.h and string-fzi.h

    While alpha has the more important string functions in assembly,
    there are still a few for find the generic routines are used.

    Use the CMPBGE insn, via the builtin, for testing of zeros.  Use a
    simplified expansion of __builtin_ctz when the insn isn't available.

        * sysdeps/alpha/string-fza.h: New file.
        * sysdeps/alpha/string-fzb.h: New file.
        * sysdeps/alpha/string-fzi.h: New file.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1da9832f154b026451369da54a7860266e691c95

commit 1da9832f154b026451369da54a7860266e691c95
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:22:39 2017 -0200

    hppa: Add string-fzb.h and string-fzi.h

    Use UXOR,SBZ to test for a zero byte within a word.  While we can
    get semi-decent code out of asm-goto, we would do slightly better
    with a compiler builtin.

    For index_zero et al, sequential testing of bytes is less expensive than
    any tricks that involve a count-leading-zeros insn that we don't have.

        * sysdeps/hppa/string-fza.h: New file.
        * sysdeps/hppa/string-fzb.h: New file.
        * sysdeps/hppa/string-fzi.h: New file.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6396dd6f4ead1ae41aa2e07103f0a68001f3e208

commit 6396dd6f4ead1ae41aa2e07103f0a68001f3e208
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:22:02 2017 -0200

    hppa: Add memcopy.h

    GCC's combine pass cannot merge (x >> c | y << (32 - c)) into a
    double-word shift unless (1) the subtract is in the same basic block
    and (2) the result of the subtract is used exactly once.  Neither
    condition is true for any use of MERGE.

    By forcing the use of a double-word shift, we not only reduce
    contention on SAR, but also allow the setting of SAR to be hoisted
    outside of a loop.

        * sysdeps/hppa/memcopy.h: New file.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=903270e20262487e0dbf1a12d36db172787ef2da

commit 903270e20262487e0dbf1a12d36db172787ef2da
Author: Adhemerval Zanella <adhemerval.zanella@linaro.com>
Date:   Wed Mar 8 16:56:17 2017 +0100

    Improve generic strcpy

    New generic implementation tries to use word operations along with
    the new string-fz{b,i} functions even for inputs with different
    alignments (with still uses aligned access plus merge operation
    to get a correct word by word comparison).

        * string/strcpy.c: Rewrite using memcopy.h, string-fzb.h,
            string-fzi.h.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d8c455b1a050a8d9806b568b1d064fa46e12f634

commit d8c455b1a050a8d9806b568b1d064fa46e12f634
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:21:26 2017 -0200

    Improve generic strcmp

    New generic implementation tries to use word operations along with
    the new string-fz{b,i} functions even for inputs with different
    alignments (with still uses aligned access plus merge operation
    to get a correct word by word comparison).

        * string/strcmp.c: Rewrite using memcopy.h, string-fzb.h,
        string-fzi.h.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2dba7f25afce8fe2f38ce333bfd6506105b89633

commit 2dba7f25afce8fe2f38ce333bfd6506105b89633
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Feb 16 16:21:03 2017 -0200

    Improve generic strnlen

    With an optimized memchr, new strnlen implementation basically calls
    memchr and adjust the result pointer value.

        [BZ #5806]
        * string/strnlen.c: Rewrite in terms of memchr.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=445306b7ebb5b544509313edde654315fc34c8a3

commit 445306b7ebb5b544509313edde654315fc34c8a3
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:20:35 2017 -0200

    Improve generic memrchr

    New algorithm have the following key differences:

      - Use string-fz{b,i} functions.

        [BZ #5806]
        * string/memrchr.c: Use string-fzb.h, string-fzi.h.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=231a8739e99c60c6ba0804b22e18093c402d0b03

commit 231a8739e99c60c6ba0804b22e18093c402d0b03
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:19:40 2017 -0200

    Improve generic strchrnul

    New algorithm have the following key differences:

      - Reads first word unaligned and use string-maskoff function to
        remove unwanted data.  This strategy follow assemble optimized
        ones for aarch64, powerpc and tile.

      - Use string-fz{b,i} functions.

        [BZ #5806]
        * string/strchrnul.c: Use string-fzb.h, string-fzi.h.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7fab7d55da5cbcccc034188a4bec35b8a0522402

commit 7fab7d55da5cbcccc034188a4bec35b8a0522402
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:19:12 2017 -0200

    Improve generic memchr

    New algorithm have the following key differences:

      - Reads first word unaligned and use string-maskoff function to
        remove unwanted data.  This strategy follow assemble optimized
        ones for aarch64, powerpc and tile.

      - Use string-fz{b,i} and string-opthr functions.

        [BZ #5806]
        * string/memchr.c: Use string-fzb.h, string-fzi.h, string-opthr.h.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c1ed1c8d1b25ec9cc0d788070682e5db2827c147

commit c1ed1c8d1b25ec9cc0d788070682e5db2827c147
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:18:48 2017 -0200

    Improve generic strchr

    New algorithm have the following key differences:

      - Reads first word unaligned and use string-maskoff function to
        remove unwanted data.  This strategy follow assemble optimized
        ones for aarch64 and powerpc.

      - Use string-fz{b,i} and string-extbyte function.

        [BZ #5806]
        * string/strchr.c: Use string-fzb.h, string-fzi.h, string-extbyte.h.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7f989a408cd9197d2b69fbf81a1408200d7efc40

commit 7f989a408cd9197d2b69fbf81a1408200d7efc40
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:18:24 2017 -0200

    Improve generic strlen

    New algorithm have the following key differences:

      - Reads first word unaligned and use string-maskoff function to
        remove unwanted data.  This strategy follow assemble optimized
        ones for powerpc, sparc, and SH.

      - Extract has_zero and index_first_zero tests into headers that
        can be tailored for the architecture.

        [BZ #5806]
                * sysdeps/generic/string-fza.h: New file.
                * sysdeps/generic/string-fzb.h: New file.
                * sysdeps/generic/string-fzi.h: New file.
                * sysdeps/generic/string-extbyte.h: New file.
                * string/strlen.c: Use them.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d16d6a7e1fe19a5f252f721a3229c0daf8979a31

commit d16d6a7e1fe19a5f252f721a3229c0daf8979a31
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Feb 23 18:45:54 2017 -0300

    Add string-maskoff.h generic header

    Macros to operate on unaligned access for string operations, such as
    to create a bit mask to remove non wanted bytes from an unaligned
    read, and to repeat byte within a word.

        * sysdeps/generic/string-maskoff.h: New file.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ad1d81b8ba31514579912a7ff52c5405c21b9726

commit ad1d81b8ba31514579912a7ff52c5405c21b9726
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:15:27 2017 -0200

    Parameterize OP_T_THRES from memcopy.h

    Basically it moves OP_T_THRES out of memcopy.h to its own header
    and adjust each architecture that redefines it.

        * sysdeps/generic/memcopy.h (OP_T_THRES): Move...
        * sysdeps/generic/string-opthr.h: ... here; new file.
        * sysdeps/i386/memcopy.h (OP_T_THRES): Move...
        * sysdeps/i386/string-opthr.h: ... here; new file.
        * sysdeps/m68k/memcopy.h (OP_T_THRES): Remove.
        * sysdeps/powerpc/powerpc32/power4/memcopy.h (OP_T_THRES): Remove.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6b9ecce2f78a2bebc2c1c21c0b21e32ccdad8862

commit 6b9ecce2f78a2bebc2c1c21c0b21e32ccdad8862
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Feb 16 16:14:09 2017 -0200

    Parameterize op_t from memcopy.h

    Basically moves op_t definition out to an specific header.

        * sysdeps/generic/string-optype.h: New file.
        * sysdeps/generic/memcopy.h: Include it.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=85893852d17ce5742f128308e55ead1f10e2beb0

commit 85893852d17ce5742f128308e55ead1f10e2beb0
Author: Adhemerval Zanella <adhemerval.zanella@linaro.com>
Date:   Thu Mar 9 15:00:27 2017 +0100

    string: Remove __memchr definition

    Since memchr is a C90 function (so there are no external-linkage
    namespace issues), and not used in any macros defined in installed headers
    (so no block-scope namespace issues) it is safe to just remove its
    internal definition and just set all the arch specific implementation
    to just define memchr instead.

    Checked on x86_64-linux-gnu and with build-many-glibc.py.

        * string/memchr.c (__memchr): Redefine to memchr.
        * sysdeps/aarch64/memchr.S (__memchr): Likewise.
        * sysdeps/aarch64/rawmemchr.S (__memchr): Likewise.
        * sysdeps/i386/i686/multiarch/memchr.S (__memchr): Likewise.
        * sysdeps/i386/memchr.S (__memchr): Likewise.
        * sysdeps/ia64/memchr.S (__memchr): Likewise.
        * sysdeps/m68k/memchr.S (__memchr): Likewise.
        * sysdeps/powerpc/powerpc32/power4/multiarch/memchr-ppc32.c
         (__memchr): Likewise.
        * sysdeps/powerpc/powerpc32/power7/memchr.S (__memchr): Likewise.
        * sysdeps/powerpc/powerpc64/power7/memchr.S (__memchr): Likewise.
        * sysdeps/sparc/sparc32/memchr.S (__memchr): Likewise.
        * sysdeps/sparc/sparc64/memchr.S (__memchr): Likewise.
        * sysdeps/tile/tilegx/memchr.c (__memchr): Likewise.
        * sysdeps/tile/tilepro/memchr.c (__memchr): Likewise.
        * sysdeps/x86_64/memchr.S (__memchr): Likewise.

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

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