This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch hjl/erms/hybrid updated. glibc-2.23-132-ge0ab62a


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  e0ab62a852e0d3414e85abe9f3e32d966348f677 (commit)
      from  c2f9d014849d725458b546a351a9b0a93212d613 (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=e0ab62a852e0d3414e85abe9f3e32d966348f677

commit e0ab62a852e0d3414e85abe9f3e32d966348f677
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Mar 25 19:29:41 2016 -0700

    Avoid slow backward REP MOVSB

diff --git a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
index 973e6d8..7c33083 100644
--- a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
+++ b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
@@ -115,6 +115,7 @@ END (MEMMOVE_CHK_ERMS)
 # endif
 
 # if VEC_SIZE == 16
+/* Only used to measure performance of REP STOSB.  */
 #  ifdef SHARED
 ENTRY (__mempcpy_erms)
 	movq	%rdi, %rax
@@ -125,18 +126,13 @@ END (__mempcpy_erms)
 
 ENTRY (__memmove_erms)
 	movq	%rdi, %rax
-#else
-	/* Provide a symbol for debugger.  */
-ENTRY (MEMMOVE_ENTRY (MEMMOVE_ERMS))
-# endif
-L(movsb):
 	movq	%rdx, %rcx
 	cmpq	%rsi, %rdi
-	jbe	L(movsb_forward)
+	jbe	1f
 	leaq	(%rsi,%rcx), %rdx
 	cmpq	%rdx, %rdi
 	jb	L(movsb_backward)
-L(movsb_forward):
+1:
 	rep movsb
 	ret
 L(movsb_backward):
@@ -146,11 +142,8 @@ L(movsb_backward):
 	rep movsb
 	cld
 	ret
-# if VEC_SIZE == 16
 END (__memmove_erms)
 strong_alias (__memmove_erms, __memcpy_erms)
-# else
-END (MEMMOVE_ENTRY (MEMMOVE_ERMS))
 # endif
 
 ENTRY (MEMMOVE_ERMS)
@@ -179,6 +172,25 @@ L(return):
 	VZEROUPPER
 	ret
 
+L(movsb):
+	movq	%rdx, %rcx
+	cmpq	%rsi, %rdi
+	jbe	1f
+	leaq	(%rsi,%rcx), %rdx
+	cmpq	%rdx, %rdi
+	/* Avoid slow backward REP MOVSB.  */
+	jb	2f
+1:
+	rep movsb
+	ret
+
+2:
+	movq	%rcx, %rdx
+# if REP_MOVSB_THRESHOLD <= (VEC_SIZE * 8)
+#  error Unsupported REP_MOVSB_THRESHOLD and VEC_SIZE!
+# endif
+	jmp	L(more_8x_vec_backward)
+
 	.p2align 4,,10
 	.p2align 4
 L(more_2x_vec):

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

Summary of changes:
 .../x86_64/multiarch/memmove-vec-unaligned-erms.S  |   32 +++++++++++++------
 1 files changed, 22 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]