94084c
commit f2413f2710d5d5cc884b413b83fcf8198e3717fa
94084c
Author: H.J. Lu <hjl.tools@gmail.com>
94084c
Date:   Sat Aug 28 06:10:38 2021 -0700
94084c
94084c
    x86-64: Use testl to check __x86_string_control
94084c
    
94084c
    Use testl, instead of andl, to check __x86_string_control to avoid
94084c
    updating __x86_string_control.
94084c
    
94084c
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
94084c
    (cherry picked from commit 3c8b9879cab6d41787bc5b14c1748f62fd6d0e5f)
94084c
94084c
diff --git a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
94084c
index 9f02624375c07b26..abde8438d41f2320 100644
94084c
--- a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
94084c
+++ b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
94084c
@@ -325,7 +325,7 @@ L(movsb):
94084c
 	/* Avoid slow backward REP MOVSB.  */
94084c
 	jb	L(more_8x_vec_backward)
94084c
 # if AVOID_SHORT_DISTANCE_REP_MOVSB
94084c
-	andl	$X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB, __x86_string_control(%rip)
94084c
+	testl	$X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB, __x86_string_control(%rip)
94084c
 	jz	3f
94084c
 	movq	%rdi, %rcx
94084c
 	subq	%rsi, %rcx
94084c
@@ -333,7 +333,7 @@ L(movsb):
94084c
 # endif
94084c
 1:
94084c
 # if AVOID_SHORT_DISTANCE_REP_MOVSB
94084c
-	andl	$X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB, __x86_string_control(%rip)
94084c
+	testl	$X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB, __x86_string_control(%rip)
94084c
 	jz	3f
94084c
 	movq	%rsi, %rcx
94084c
 	subq	%rdi, %rcx