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/21572] __strcmp_sse42/__strcmp_avx /__strncmp_avx are unused


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

--- Comment #3 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, hjl/ifunc/c has been created
        at  80ba342d9d286e457ce16e9867824078fa45c78f (commit)

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

commit 80ba342d9d286e457ce16e9867824078fa45c78f
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jun 12 17:08:44 2017 -0700

    x86-64: Implement strcmp family IFUNC selectors in C

    Implement strcmp family IFUNC selectors in C and enable SSE4.2/AVX
    strcmp/strncmp.

    All internal calls within libc.so can use IFUNC on x86-64 since unlike
    x86, x86-64 supports PC-relative addressing to access the GOT entry so
    that it can call via PLT without using an extra register.  For libc.a,
    we can't use IFUNC for functions which are called before IFUNC has been
    initialized.  Use IFUNC internally reduces the icache footprint since
    libc.so and other codes in the process use the same implementations.
    This patch uses IFUNC for strcmp family functions within libc.

        [BZ #21572]
        * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
        strcmp-sse2, strcmp-sse4_2, strcmp-avx, strncmp-sse2,
        strncmp-sse4_2, strncmp-avx, strcasecmp_l-sse2,
        strcasecmp_l-sse4_2, strcasecmp_l-avx, strncase_l-sse2,
        strncase_l-sse4_2 and strncase_l-avx.
        * sysdeps/x86_64/multiarch/ifunc-impl-list.c
        (__libc_ifunc_impl_list): Add tests for __strcmp_avx and
        __strncmp_avx.
        * sysdeps/x86_64/multiarch/ifunc-strcmp.h: New file.
        * sysdeps/x86_64/multiarch/strcasecmp.c: Likewise.
        * sysdeps/x86_64/multiarch/strcasecmp_l-avx.S: Likewise.
        * sysdeps/x86_64/multiarch/strcasecmp_l-sse2.S: Likewise.
        * sysdeps/x86_64/multiarch/strcasecmp_l-sse4_2.S: Likewise.
        * sysdeps/x86_64/multiarch/strcasecmp_l.c: Likewise.
        * sysdeps/x86_64/multiarch/strcmp-avx.S: Likewise.
        * sysdeps/x86_64/multiarch/strcmp-sse2.S: Likewise.
        * sysdeps/x86_64/multiarch/strcmp-sse4_2.S: Likewise.
        * sysdeps/x86_64/multiarch/strcmp.c: Likewise.
        * sysdeps/x86_64/multiarch/strncase.c: Likewise.
        * sysdeps/x86_64/multiarch/strncase_l-avx.S : Likewise.
        * sysdeps/x86_64/multiarch/strncase_l-sse2.S: Likewise.
        * sysdeps/x86_64/multiarch/strncase_l-sse4_2.S: Likewise.
        * sysdeps/x86_64/multiarch/strncase_l.c: Likewise.
        * sysdeps/x86_64/multiarch/strncmp-avx.S: Likewise.
        * sysdeps/x86_64/multiarch/strncmp-sse2.S: Likewise.
        * sysdeps/x86_64/multiarch/strncmp-sse4_2.S: Likewise.
        * sysdeps/x86_64/multiarch/strncmp.c: Likewise.
        * sysdeps/x86_64/multiarch/strcasecmp_l.S: Removed.
        * sysdeps/x86_64/multiarch/strcmp.S: Likewise.
        * sysdeps/x86_64/multiarch/strncase_l.S: Likewise.
        * sysdeps/x86_64/multiarch/strncmp.S: Likewise.
        * sysdeps/x86_64/multiarch/strcmp-sse42.S: Include <sysdep.h>.
        (STRCMP_SSE42): New.  Defined to __strcmp_sse42 if not defined.
        [USE_AS_STRCASECMP_L || USE_AS_STRNCASECMP_L]: Include
        "locale-defines.h".
        (UPDATE_STRNCMP_COUNTER): New.
        (SECTION): Likewise.
        (GLABEL): Likewise.
        (LABEL): Likewise.
        * sysdeps/x86_64/multiarch/strncmp-ssse3.S: Rewrite and enable
        for libc.a

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

commit b504a67ac93412654daf5f3c0fedc97f2c350b86
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jun 12 06:13:52 2017 -0700

    x86-64: Implement strcspn/strpbrk/strspn IFUNC selectors in C

    Implement strcspn/strpbrk/strspn IFUNC selectors in C

    All internal calls within libc.so can use IFUNC on x86-64 since unlike
    x86, x86-64 supports PC-relative addressing to access the GOT entry so
    that it can call via PLT without using an extra register.  For libc.a,
    we can't use IFUNC for functions which are called before IFUNC has been
    initialized.  Use IFUNC internally reduces the icache footprint since
    libc.so and other codes in the process use the same implementations.
    This patch uses IFUNC for strcspn/strpbrk/strspn functions within libc.

        * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
        strcspn-sse2, strpbrk-sse2 and strspn-sse2.
        * sysdeps/x86_64/strcspn.S (STRPBRK_P): Removed.
        Check USE_AS_STRPBRK instead of STRPBRK_P.
        * sysdeps/x86_64/strpbrk.S (USE_AS_STRPBRK): New.
        * sysdeps/x86_64/multiarch/ifunc-sse4_2.h: New file.
        * sysdeps/x86_64/multiarch/strcspn-sse2.S: Likewise.
        * sysdeps/x86_64/multiarch/strcspn.c: Likewise.
        * sysdeps/x86_64/multiarch/strpbrk-sse2.S: Likewise.
        * sysdeps/x86_64/multiarch/strpbrk.c: Likewise.
        * sysdeps/x86_64/multiarch/strspn-sse2.S: Likewise.
        * sysdeps/x86_64/multiarch/strspn.c: Likewise.
        * sysdeps/x86_64/multiarch/strcspn.S: Removed.
        * sysdeps/x86_64/multiarch/strpbrk.S: Likewise.
        * sysdeps/x86_64/multiarch/strspn.S: Likewise.
        * sysdeps/x86_64/multiarch/strpbrk-c.c: Remove "#ifdef SHARED"
        and "#endif".

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

commit 6e08c9b37370018ae5b22778e598c8fa42a6c5bc
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jun 12 05:40:00 2017 -0700

    x86-64: Implement wcscpy IFUNC selector in C

        * sysdeps/x86_64/multiarch/wcscpy.S: Removed.
        * sysdeps/x86_64/multiarch/wcscpy.c: New file.

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

commit 2302e258179e43cbefa889f8d26006c96173966b
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Jun 11 16:20:58 2017 -0700

    x86-64: Implement strcat family IFUNC selectors in C

    Implement strcat family IFUNC selectors in C.

    All internal calls within libc.so can use IFUNC on x86-64 since unlike
    x86, x86-64 supports PC-relative addressing to access the GOT entry so
    that it can call via PLT without using an extra register.  For libc.a,
    we can't use IFUNC for functions which are called before IFUNC has been
    initialized.  Use IFUNC internally reduces the icache footprint since
    libc.so and other codes in the process use the same implementations.
    This patch uses IFUNC for strcat family functions within libc.

        * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
        strcat-sse2.
        * sysdeps/x86_64/multiarch/strcat-sse2.S: New file.
        * sysdeps/x86_64/multiarch/strcat.c: Likewise.
        * sysdeps/x86_64/multiarch/strncat.c: Likewise.
        * sysdeps/x86_64/multiarch/strcat.S: Removed.
        * sysdeps/x86_64/multiarch/strncat.S: Likewise.

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

commit d360e53aa1a658930e143b4dec85cb81c18e65cc
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Jun 11 06:18:32 2017 -0700

    x86-64: Implement strcpy family IFUNC selectors in C

    Implement strcpy family IFUNC selectors in C.

    All internal calls within libc.so can use IFUNC on x86-64 since unlike
    x86, x86-64 supports PC-relative addressing to access the GOT entry so
    that it can call via PLT without using an extra register.  For libc.a,
    we can't use IFUNC for functions which are called before IFUNC has been
    initialized.  Use IFUNC internally reduces the icache footprint since
    libc.so and other codes in the process use the same implementations.
    This patch uses IFUNC for strcpy family functions within libc.

        * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
        strcpy-sse2 and stpcpy-sse2.
        * sysdeps/x86_64/multiarch/ifunc-unaligned-ssse3.h: New file.
        * sysdeps/x86_64/multiarch/stpcpy-sse2.S: Likewise.
        * sysdeps/x86_64/multiarch/stpcpy.c: Likewise.
        * sysdeps/x86_64/multiarch/stpncpy.c: Likewise.
        * sysdeps/x86_64/multiarch/strcpy-sse2.S: Likewise.
        * sysdeps/x86_64/multiarch/strcpy.c: Likewise.
        * sysdeps/x86_64/multiarch/strncpy.c: Likewise.
        * sysdeps/x86_64/multiarch/stpcpy.S: Removed.
        * sysdeps/x86_64/multiarch/stpncpy.S: Likewise.
        * sysdeps/x86_64/multiarch/strcpy.S: Likewise.
        * sysdeps/x86_64/multiarch/strncpy.S: Likewise.
        * sysdeps/x86_64/multiarch/stpncpy-c.c (weak_alias): New.
        (libc_hidden_def): Always defined as empty.
        * sysdeps/x86_64/multiarch/strncpy-c.c (libc_hidden_builtin_def):
        Always Defined as empty.

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

commit 8dfbfe0d8fb7bf6b05cd339880416221c6872f97
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jun 7 20:37:09 2017 -0700

    x86-64: Implement memcmp family IFUNC selectors in C

    Implement memcmp family IFUNC selectors in C.

    All internal calls within libc.so can use IFUNC on x86-64 since unlike
    x86, x86-64 supports PC-relative addressing to access the GOT entry so
    that it can call via PLT without using an extra register.  For libc.a,
    we can't use IFUNC for functions which are called before IFUNC has been
    initialized.  Use IFUNC internally reduces the icache footprint since
    libc.so and other codes in the process use the same implementations.
    This patch uses IFUNC for memcmp family functions within libc.

    2017-06-07  H.J. Lu  <hongjiu.lu@intel.com>
            Erich Elsen  <eriche@google.com>

        * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
        memcmp-sse2.
        * sysdeps/x86_64/multiarch/ifunc-memcmp.h: New file.
        * sysdeps/x86_64/multiarch/memcmp-sse2.S: Likewise.
        * sysdeps/x86_64/multiarch/memcmp.c: Likewise.
        * sysdeps/x86_64/multiarch/wmemcmp.c: Likewise.
        * sysdeps/x86_64/multiarch/memcmp.S: Removed.
        * sysdeps/x86_64/multiarch/wmemcmp.S: Likewise.

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

commit 4c6c4564cd8dbf06ee6dce8ac3bdafb3795c1cec
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jun 7 19:59:13 2017 -0700

    x86-64: Implement memset family IFUNC selectors in C

    Implement memset family IFUNC selectors in C.

    All internal calls within libc.so can use IFUNC on x86-64 since unlike
    x86, x86-64 supports PC-relative addressing to access the GOT entry so
    that it can call via PLT without using an extra register.  For libc.a,
    we can't use IFUNC for functions which are called before IFUNC has been
    initialized.  Use IFUNC internally reduces the icache footprint since
    libc.so and other codes in the process use the same implementations.
    This patch uses IFUNC for memset functions within libc.

    2017-06-07  H.J. Lu  <hongjiu.lu@intel.com>
            Erich Elsen  <eriche@google.com>

        * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
        memset-sse2-unaligned-erms, and memset_chk-nonshared.
        * sysdeps/x86_64/multiarch/ifunc-impl-list.c
        (__libc_ifunc_impl_list): Add test for __memset_chk_erms.
        Update comments.
        * sysdeps/x86_64/multiarch/ifunc-memset.h: New file.
        * sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S: Likewise.
        * sysdeps/x86_64/multiarch/memset.c: Likewise.
        * sysdeps/x86_64/multiarch/memset_chk-nonshared.S: Likewise.
        * sysdeps/x86_64/multiarch/memset_chk.c: Likewise.
        * sysdeps/x86_64/multiarch/memset.S: Removed.
        * sysdeps/x86_64/multiarch/memset_chk.S: Likewise.
        * sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
        (__memset_chk_erms): New function.

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

commit 471fb6a803e63cce05d03cb37ed89b2cc46065e7
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 30 08:49:36 2017 -0700

    x86-64: Implement memmove family IFUNC selectors in C

    Implement memmove family IFUNC selectors in C.

    All internal calls within libc.so can use IFUNC on x86-64 since unlike
    x86, x86-64 supports PC-relative addressing to access the GOT entry so
    that it can call via PLT without using an extra register.  For libc.a,
    we can't use IFUNC for functions which are called before IFUNC has been
    initialized.  Use IFUNC internally reduces the icache footprint since
    libc.so and other codes in the process use the same implementations.
    This patch uses IFUNC for memmove family functions within libc.

    2017-06-07  H.J. Lu  <hongjiu.lu@intel.com>
            Erich Elsen  <eriche@google.com>
            Adhemerval Zanella  <adhemerval.zanella@linaro.org>

        * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
        memmove-sse2-unaligned-erms, memcpy_chk-nonshared,
        mempcpy_chk-nonshared and memmove_chk-nonshared.
        * sysdeps/x86_64/multiarch/ifunc-impl-list.c
        (__libc_ifunc_impl_list): Add tests for __memmove_chk_erms,
        __memcpy_chk_erms and __mempcpy_chk_erms.  Update comments.
        * sysdeps/x86_64/multiarch/ifunc-memmove.h: New file.
        * sysdeps/x86_64/multiarch/memcpy.c: Likewise.
        * sysdeps/x86_64/multiarch/memcpy_chk-nonshared.S: Likewise.
        * sysdeps/x86_64/multiarch/memcpy_chk.c: Likewise.
        * sysdeps/x86_64/multiarch/memmove-sse2-unaligned-erms.S: Likewise.
        * sysdeps/x86_64/multiarch/memmove.c: Likewise.
        * sysdeps/x86_64/multiarch/memmove_chk-nonshared.S: Likewise.
        * sysdeps/x86_64/multiarch/memmove_chk.c: Likewise.
        * sysdeps/x86_64/multiarch/mempcpy.c: Likewise.
        * sysdeps/x86_64/multiarch/mempcpy_chk-nonshared.S: Likewise.
        * sysdeps/x86_64/multiarch/mempcpy_chk.c: Likewise.
        * sysdeps/x86_64/multiarch/memcpy.S: Removed.
        * sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise.
        * sysdeps/x86_64/multiarch/memmove.S: Likewise.
        * sysdeps/x86_64/multiarch/memmove_chk.S: Likewise.
        * sysdeps/x86_64/multiarch/mempcpy.S: Likewise.
        * sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise.
        * sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
        (__mempcpy_chk_erms): New function.
        (__memmove_chk_erms): Likewise.
        (__memcpy_chk_erms): New alias.

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

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