This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch hjl/erms/hybrid updated. glibc-2.23-133-gb7f1bda
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 27 Mar 2016 15:01:53 -0000
- Subject: GNU C Library master sources branch hjl/erms/hybrid updated. glibc-2.23-133-gb7f1bda
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/erms/hybrid has been updated
via b7f1bda4b88d7e874f03af61b75eda50cf8d3a16 (commit)
via 9accf41e85a405fcc553e1fd07192c8da5412ad9 (commit)
from c1cf88aac1a30ece7daf9b299d0a1f5ee0e9129a (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 -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b7f1bda4b88d7e874f03af61b75eda50cf8d3a16
commit b7f1bda4b88d7e874f03af61b75eda50cf8d3a16
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun Mar 27 08:01:02 2016 -0700
Optimize for small memmove-vec-unaligned-erms.S
diff --git a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
index 455dfde..3439a9c 100644
--- a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
+++ b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
@@ -112,7 +112,7 @@ END (MEMMOVE_SYMBOL (__memmove_chk, unaligned_erms))
# endif
# if VEC_SIZE == 16
-/* Only used to measure performance of REP STOSB. */
+/* Only used to measure performance of REP MOVSB. */
# ifdef SHARED
ENTRY (__mempcpy_erms)
movq %rdi, %rax
@@ -148,10 +148,8 @@ ENTRY (MEMMOVE_SYMBOL (__memmove, unaligned_erms))
L(start_erms):
cmpq $VEC_SIZE, %rdx
jb L(less_vec)
- cmpq $REP_MOVSB_THRESHOLD, %rdx
- ja L(movsb)
cmpq $(VEC_SIZE * 2), %rdx
- ja L(more_2x_vec)
+ ja L(movsb_more_2x_vec)
L(last_2x_vec):
/* From VEC and to 2 * VEC. No branch when size == VEC_SIZE. */
VMOVU (%rsi), %VEC(0)
@@ -177,7 +175,10 @@ L(movsb):
rep movsb
ret
- .p2align 4,,10
+ .p2align 4
+L(movsb_more_2x_vec):
+ cmpq $REP_MOVSB_THRESHOLD, %rdx
+ ja L(movsb)
.p2align 4
L(more_2x_vec):
/* More than 2 * VEC. */
@@ -224,7 +225,6 @@ L(copy_forward):
leaq VEC_SIZE(%r10), %r9
leaq (VEC_SIZE * 2)(%r10), %r8
leaq (VEC_SIZE * 3)(%r10), %r11
- .p2align 4,,10
.p2align 4
L(loop):
VMOVU (%rcx,%r10), %VEC(0)
@@ -358,7 +358,6 @@ L(more_8x_vec):
cmpq %rsi, %rdi
ja L(more_8x_vec_backward)
- .p2align 4,,10
.p2align 4
L(loop_8x_vec_forward):
/* Copy 8 * VEC a time forward. */
@@ -393,7 +392,6 @@ L(more_8x_vec_backward):
leaq -VEC_SIZE(%rsi, %rdx), %rcx
leaq -VEC_SIZE(%rdi, %rdx), %r9
- .p2align 4,,10
.p2align 4
L(loop_8x_vec_backward):
/* Copy 8 * VEC a time backward. */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9accf41e85a405fcc553e1fd07192c8da5412ad9
commit 9accf41e85a405fcc553e1fd07192c8da5412ad9
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun Mar 27 07:52:41 2016 -0700
Optimize small memset
diff --git a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
index 3bc0a3a..1b596ce 100644
--- a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
+++ b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
@@ -80,6 +80,26 @@ L(entry_from_bzero):
ret
END (MEMSET_SYMBOL (__memset, unaligned))
+#if VEC_SIZE == 16
+/* Only used to measure performance of REP STOSB. */
+ENTRY (__memset_erms)
+#else
+/* Provide a symbol to debugger. */
+ENTRY (MEMSET_SYMBOL (__memset, erms))
+#endif
+L(stosb):
+ movq %rdx, %rcx
+ movzbl %sil, %eax
+ movq %rdi, %rdx
+ rep stosb
+ movq %rdx, %rax
+ ret
+#if VEC_SIZE == 16
+END (__memset_erms)
+#else
+END (MEMSET_SYMBOL (__memset, erms))
+#endif
+
#if defined SHARED && IS_IN (libc)
ENTRY_CHK (MEMSET_SYMBOL (__memset_chk, unaligned_erms))
cmpq %rdx, %rcx
@@ -88,25 +108,22 @@ END_CHK (MEMSET_SYMBOL (__memset_chk, unaligned_erms))
#endif
ENTRY (MEMSET_SYMBOL (__memset, unaligned_erms))
- cmpq $REP_STOSB_THRESHOLD, %rdx
- jbe L(memset_entry)
-#if VEC_SIZE == 16 && IS_IN (libc)
- /* Only used to measure performance of REP STOSB. */
- .globl __memset_erms
- .type __memset_erms,@function
-__memset_erms:
-#endif
- movq %rdx, %rcx
- movzbl %sil, %eax
- movq %rdi, %rdx
- rep stosb
- movq %rdx, %rax
+ VDUP_TO_VEC0_AND_SET_RETURN (%esi, %rdi)
+ cmpq $VEC_SIZE, %rdx
+ jb L(less_vec)
+ cmpq $(VEC_SIZE * 2), %rdx
+ ja L(stosb_more_2x_vec)
+ /* From VEC and to 2 * VEC. No branch when size == VEC_SIZE. */
+ VMOVU %VEC(0), -VEC_SIZE(%rdi,%rdx)
+ VMOVU %VEC(0), (%rdi)
+ VZEROUPPER
ret
-#if VEC_SIZE == 16 && IS_IN (libc)
- .size __memset_erms, . - __memset_erms
-#endif
.p2align 4
+L(stosb_more_2x_vec):
+ cmpq $REP_STOSB_THRESHOLD, %rdx
+ ja L(stosb)
+ .p2align 4
L(more_2x_vec):
cmpq $(VEC_SIZE * 4), %rdx
ja L(loop_start)
-----------------------------------------------------------------------
Summary of changes:
.../x86_64/multiarch/memmove-vec-unaligned-erms.S | 14 ++---
.../x86_64/multiarch/memset-vec-unaligned-erms.S | 49 +++++++++++++------
2 files changed, 39 insertions(+), 24 deletions(-)
hooks/post-receive
--
GNU C Library master sources