This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug string/18880] Wrong selector in x86_64/multiarch/memcpy.S
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 28 Aug 2015 13:06:51 +0000
- Subject: [Bug string/18880] Wrong selector in x86_64/multiarch/memcpy.S
- Auto-submitted: auto-generated
- References: <bug-18880-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18880
--- Comment #2 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/unaligned has been created
at 9db00f75ae25af0c043de52786739dcdf52e53f5 (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9db00f75ae25af0c043de52786739dcdf52e53f5
commit 9db00f75ae25af0c043de52786739dcdf52e53f5
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Aug 25 11:01:20 2015 -0700
Make strcmp with unaligned load/store the default
Since strcmp_sse2_unaligned performs better on current Intel and AMD
processors, this patch makes it the default.
* sysdeps/x86_64/strcmp.S: Moved to ...
* sysdeps/x86_64/multiarch/strcmp-sse2.S: Here. Remove
"#if !IS_IN (libc)". Remove libc_hidden_builtin_def (STRCMP).
(STRCMP): Defined to __strcmp_sse2 if not defined.
* sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S: Moved to ...
* sysdeps/x86_64/strcmp.S: Here. Remove "#if IS_IN (libc)".
Add .text. Add libc_hidden_builtin_def (strcmp).
(__strcmp_sse2_unaligned): Renamed to ...
(strcmp): This.
* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
strcmp-sse2.
* sysdeps/x86_64/multiarch/strcasecmp_l-ssse3.S: Include
strcmp-sse2.S instead of ../strcmp.S.
* sysdeps/x86_64/multiarch/strcmp-ssse3.S: Likewise.
* sysdeps/x86_64/multiarch/strncase_l-ssse3.S: Likewise.
* sysdeps/x86_64/multiarch/strncmp-ssse3.S: Likewise.
* sysdeps/x86_64/multiarch/strcmp.S
[USE_AS_STRCMP] (STRCMP_SSE2): Set to __strcmp_sse2_unaligned.
[USE_AS_STRCMP] (STRCMP): Load __strcmp_sse2 instead of
STRCMP_SSE2.
[USE_AS_STRCMP] (strcmp): Defined __strcmp_sse2_unaligned if
in libc.
[!USE_AS_STRCMP]: Include strcmp-sse2S instead of ../strcmp.S.
* sysdeps/x86_64/strcasecmp_l.S: Include multiarch/strcmp-sse2.S
instead of strcmp.S. Add libc_hidden_builtin_def (STRCMP).
* sysdeps/x86_64/strncase_l.S: Likewise.
* sysdeps/x86_64/strncmp.S: Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e05a252da92a4dd15d4be40a855d31bd864804e9
commit e05a252da92a4dd15d4be40a855d31bd864804e9
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Aug 28 05:40:35 2015 -0700
Correct x86-64 memcpy/mempcpy multiarch selector
For x86-64 memcpy/mempcpy, we choose the best implementation by the
order:
1. __memcpy_avx_unaligned if AVX_Fast_Unaligned_Load bit is set.
2. __memcpy_sse2_unaligned if Fast_Unaligned_Load bit is set.
3. __memcpy_sse2 if SSSE3 isn't available.
4. __memcpy_ssse3_back if Fast_Copy_Backward bit it set.
5. __memcpy_ssse3
In libc.a and ld.so, we choose __memcpy_sse2_unaligned which is optimized
for current Intel and AMD x86-64 processors.
[BZ #18880]
* sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S: Moved to ...
* sysdeps/x86_64/memcpy.S: Here. Remove "#if !IS_IN (libc)".
Add libc_hidden_builtin_def and versioned_symbol.
(__memcpy_chk): New.
(__memcpy_sse2_unaligned): Renamed to ...
(memcpy): This. Support USE_AS_MEMPCPY.
* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
mempcpy-sse2.
* sysdeps/x86_64/memcpy.S: Moved to ...
sysdeps/x86_64/multiarch/memcpy-sse2.S: Here.
(__memcpy_chk): Renamed to ...
(__memcpy_chk_sse2): This.
(memcpy): Renamed to ...
(__memcpy_sse2): This.
* sysdeps/x86_64/multiarch/memcpy.S (__new_memcpy): Properly
select the best implementation.
(ENTRY): Replace __memcpy_sse2 with __memcpy_sse2_unaligned.
(END): Likewise.
(libc_hidden_builtin_def): Likewise.
(ENTRY_CHK): Replace __memcpy_chk_sse2 with
__memcpy_chk_sse2_unaligned.
(END_CHK): Likewise.
* sysdeps/x86_64/multiarch/memcpy_chk.S (__memcpy_chk): Properly
select the best implementation.
* sysdeps/x86_64/multiarch/mempcpy.S (__mempcpy): Properly
select the best implementation.
(ENTRY): Replace __mempcpy_sse2 with __mempcpy_sse2_unaligned.
(END): Likewise.
(libc_hidden_def): Likewise.
(libc_hidden_builtin_def): Likewise.
(ENTRY_CHK): Replace __mempcpy_chk_sse2 with
__mempcpy_chk_sse2_unaligned.
(END_CHK): Likewise.
* sysdeps/x86_64/multiarch/mempcpy_chk.S (__mempcpy_chk): Properly
select the best implementation.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.