about summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-04-05 05:21:07 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-04-05 09:44:09 -0700
commit9a93bdbaff81edf67c5486c84f8098055e355abb (patch)
treecc6a2c182680ca6364c01413b95e06993ac34390
parent5118e532600549ad0f56cb9b1a179b8eab70c483 (diff)
downloadglibc-9a93bdbaff81edf67c5486c84f8098055e355abb.tar.gz
glibc-9a93bdbaff81edf67c5486c84f8098055e355abb.tar.xz
glibc-9a93bdbaff81edf67c5486c84f8098055e355abb.zip
Force 32-bit displacement in memset-vec-unaligned-erms.S
	* sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S: Force
	32-bit displacement to avoid long nop between instructions.

(cherry picked from commit ec0cac9a1f4094bd0db6f77c1b329e7a40eecc10)
-rw-r--r--sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
index 9383517536..fe0f74516d 100644
--- a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
+++ b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
@@ -159,10 +159,23 @@ L(return):
 	.p2align 4
 L(loop_start):
 	leaq	(VEC_SIZE * 4)(%rdi), %rcx
+# if VEC_SIZE == 32 || VEC_SIZE == 64
+	/* Force 32-bit displacement to avoid long nop between
+	   instructions.  */
+	VMOVU.d32 %VEC(0), (%rdi)
+# else
 	VMOVU	%VEC(0), (%rdi)
+# endif
 	andq	$-(VEC_SIZE * 4), %rcx
+# if VEC_SIZE == 32
+	/* Force 32-bit displacement to avoid long nop between
+	   instructions.  */
+	VMOVU.d32 %VEC(0), -VEC_SIZE(%rdi,%rdx)
+	VMOVU.d32 %VEC(0), VEC_SIZE(%rdi)
+# else
 	VMOVU	%VEC(0), -VEC_SIZE(%rdi,%rdx)
 	VMOVU	%VEC(0), VEC_SIZE(%rdi)
+# endif
 	VMOVU	%VEC(0), -(VEC_SIZE * 2)(%rdi,%rdx)
 	VMOVU	%VEC(0), (VEC_SIZE * 2)(%rdi)
 	VMOVU	%VEC(0), -(VEC_SIZE * 3)(%rdi,%rdx)