Force 32-bit displacement in memset-vec-unaligned-erms.S
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 5 Apr 2016 12:21:07 +0000 (05:21 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 5 Apr 2016 12:21:19 +0000 (05:21 -0700)
* sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S: Force
32-bit displacement to avoid long nop between instructions.

ChangeLog
sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S

index 4b2f408..048299a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2016-04-05   H.J. Lu  <hongjiu.lu@intel.com>
 
+       * sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S: Force
+       32-bit displacement to avoid long nop between instructions.
+
+2016-04-05   H.J. Lu  <hongjiu.lu@intel.com>
+
        * sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S: Add
        a comment on VMOVU and VMOVA.
 
index 9383517..fe0f745 100644 (file)
@@ -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)