08c3a6
commit eb9aa96facc5231e208de0946870f10c21aee9f3
08c3a6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
08c3a6
Date:   Fri May 13 09:33:30 2022 -0300
08c3a6
08c3a6
    x86_64: Remove bzero optimization
08c3a6
    
08c3a6
    Both symbols are marked as legacy in POSIX.1-2001 and removed on
08c3a6
    POSIX.1-2008, although the prototypes are defined for _GNU_SOURCE
08c3a6
    or _DEFAULT_SOURCE.
08c3a6
    
08c3a6
    GCC also replaces bcopy with a memmove and bzero with memset on default
08c3a6
    configuration (to actually get a bzero libc call the code requires
08c3a6
    to omit string.h inclusion and built with -fno-builtin), so it is
08c3a6
    highly unlikely programs are actually calling libc bzero symbol.
08c3a6
    
08c3a6
    On a recent Linux distro (Ubuntu 22.04), there is no bzero calls
08c3a6
    by the installed binaries.
08c3a6
    
08c3a6
      $ cat count_bstring.sh
08c3a6
      #!/bin/bash
08c3a6
    
08c3a6
      files=`IFS=':';for i in $PATH; do test -d "$i" && find "$i" -maxdepth 1 -executable -type f; done`
08c3a6
      total=0
08c3a6
      for file in $files; do
08c3a6
        symbols=`objdump -R $file 2>&1`
08c3a6
        if [ $? -eq 0 ]; then
08c3a6
          ncalls=`echo $symbols | grep -w $1 | wc -l`
08c3a6
          ((total=total+ncalls))
08c3a6
          if [ $ncalls -gt 0 ]; then
08c3a6
            echo "$file: $ncalls"
08c3a6
          fi
08c3a6
        fi
08c3a6
      done
08c3a6
      echo "TOTAL=$total"
08c3a6
      $ ./count_bstring.sh bzero
08c3a6
      TOTAL=0
08c3a6
    
08c3a6
    Checked on x86_64-linux-gnu.
08c3a6
    
08c3a6
    (cherry picked from commit 9403b71ae97e3f1a91c796ddcbb4e6f044434734)
08c3a6
08c3a6
diff --git a/sysdeps/x86_64/bzero.S b/sysdeps/x86_64/bzero.S
08c3a6
deleted file mode 100644
08c3a6
index f96d567fd87696af..0000000000000000
08c3a6
--- a/sysdeps/x86_64/bzero.S
08c3a6
+++ /dev/null
08c3a6
@@ -1 +0,0 @@
08c3a6
-/* Implemented in memset.S.  */
08c3a6
diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S
08c3a6
index 0358210c7ff3a976..2b64741fd10a8ec2 100644
08c3a6
--- a/sysdeps/x86_64/memset.S
08c3a6
+++ b/sysdeps/x86_64/memset.S
08c3a6
@@ -1,4 +1,4 @@
08c3a6
-/* memset/bzero -- set memory area to CH/0
08c3a6
+/* memset -- set memory area to CH/0
08c3a6
    Optimized version for x86-64.
08c3a6
    Copyright (C) 2002-2021 Free Software Foundation, Inc.
08c3a6
    This file is part of the GNU C Library.
08c3a6
@@ -35,9 +35,6 @@
08c3a6
   punpcklwd %xmm0, %xmm0; \
08c3a6
   pshufd $0, %xmm0, %xmm0
08c3a6
 
08c3a6
-# define BZERO_ZERO_VEC0() \
08c3a6
-  pxor %xmm0, %xmm0
08c3a6
-
08c3a6
 # define WMEMSET_SET_VEC0_AND_SET_RETURN(d, r) \
08c3a6
   movd d, %xmm0; \
08c3a6
   pshufd $0, %xmm0, %xmm0; \
08c3a6
@@ -56,10 +53,6 @@
08c3a6
 # define MEMSET_SYMBOL(p,s)	memset
08c3a6
 #endif
08c3a6
 
08c3a6
-#ifndef BZERO_SYMBOL
08c3a6
-# define BZERO_SYMBOL(p,s)	__bzero
08c3a6
-#endif
08c3a6
-
08c3a6
 #ifndef WMEMSET_SYMBOL
08c3a6
 # define WMEMSET_CHK_SYMBOL(p,s) p
08c3a6
 # define WMEMSET_SYMBOL(p,s)	__wmemset
08c3a6
@@ -70,7 +63,6 @@
08c3a6
 libc_hidden_builtin_def (memset)
08c3a6
 
08c3a6
 #if IS_IN (libc)
08c3a6
-weak_alias (__bzero, bzero)
08c3a6
 libc_hidden_def (__wmemset)
08c3a6
 weak_alias (__wmemset, wmemset)
08c3a6
 libc_hidden_weak (wmemset)
08c3a6
diff --git a/sysdeps/x86_64/multiarch/Makefile b/sysdeps/x86_64/multiarch/Makefile
08c3a6
index b503e4b81e92a11c..67401162d526f664 100644
08c3a6
--- a/sysdeps/x86_64/multiarch/Makefile
08c3a6
+++ b/sysdeps/x86_64/multiarch/Makefile
08c3a6
@@ -1,7 +1,6 @@
08c3a6
 ifeq ($(subdir),string)
08c3a6
 
08c3a6
 sysdep_routines += \
08c3a6
-  bzero \
08c3a6
   memchr-avx2 \
08c3a6
   memchr-avx2-rtm \
08c3a6
   memchr-evex \
08c3a6
diff --git a/sysdeps/x86_64/multiarch/bzero.c b/sysdeps/x86_64/multiarch/bzero.c
08c3a6
deleted file mode 100644
08c3a6
index 13e399a9a1fbdeb2..0000000000000000
08c3a6
--- a/sysdeps/x86_64/multiarch/bzero.c
08c3a6
+++ /dev/null
08c3a6
@@ -1,108 +0,0 @@
08c3a6
-/* Multiple versions of bzero.
08c3a6
-   All versions must be listed in ifunc-impl-list.c.
08c3a6
-   Copyright (C) 2022 Free Software Foundation, Inc.
08c3a6
-   This file is part of the GNU C Library.
08c3a6
-
08c3a6
-   The GNU C Library is free software; you can redistribute it and/or
08c3a6
-   modify it under the terms of the GNU Lesser General Public
08c3a6
-   License as published by the Free Software Foundation; either
08c3a6
-   version 2.1 of the License, or (at your option) any later version.
08c3a6
-
08c3a6
-   The GNU C Library is distributed in the hope that it will be useful,
08c3a6
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
08c3a6
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
08c3a6
-   Lesser General Public License for more details.
08c3a6
-
08c3a6
-   You should have received a copy of the GNU Lesser General Public
08c3a6
-   License along with the GNU C Library; if not, see
08c3a6
-   <https://www.gnu.org/licenses/>.  */
08c3a6
-
08c3a6
-/* Define multiple versions only for the definition in libc.  */
08c3a6
-#if IS_IN (libc)
08c3a6
-# define __bzero __redirect___bzero
08c3a6
-# include <string.h>
08c3a6
-# undef __bzero
08c3a6
-
08c3a6
-/* OPTIMIZE1 definition required for bzero patch.  */
08c3a6
-# define OPTIMIZE1(name)	EVALUATOR1 (SYMBOL_NAME, name)
08c3a6
-# define SYMBOL_NAME __bzero
08c3a6
-# include <init-arch.h>
08c3a6
-
08c3a6
-extern __typeof (REDIRECT_NAME) OPTIMIZE1 (sse2_unaligned)
08c3a6
-  attribute_hidden;
08c3a6
-extern __typeof (REDIRECT_NAME) OPTIMIZE1 (sse2_unaligned_erms)
08c3a6
-  attribute_hidden;
08c3a6
-extern __typeof (REDIRECT_NAME) OPTIMIZE1 (avx2_unaligned) attribute_hidden;
08c3a6
-extern __typeof (REDIRECT_NAME) OPTIMIZE1 (avx2_unaligned_erms)
08c3a6
-  attribute_hidden;
08c3a6
-extern __typeof (REDIRECT_NAME) OPTIMIZE1 (avx2_unaligned_rtm)
08c3a6
-  attribute_hidden;
08c3a6
-extern __typeof (REDIRECT_NAME) OPTIMIZE1 (avx2_unaligned_erms_rtm)
08c3a6
-  attribute_hidden;
08c3a6
-extern __typeof (REDIRECT_NAME) OPTIMIZE1 (evex_unaligned)
08c3a6
-  attribute_hidden;
08c3a6
-extern __typeof (REDIRECT_NAME) OPTIMIZE1 (evex_unaligned_erms)
08c3a6
-  attribute_hidden;
08c3a6
-extern __typeof (REDIRECT_NAME) OPTIMIZE1 (avx512_unaligned)
08c3a6
-  attribute_hidden;
08c3a6
-extern __typeof (REDIRECT_NAME) OPTIMIZE1 (avx512_unaligned_erms)
08c3a6
-  attribute_hidden;
08c3a6
-
08c3a6
-static inline void *
08c3a6
-IFUNC_SELECTOR (void)
08c3a6
-{
08c3a6
-  const struct cpu_features* cpu_features = __get_cpu_features ();
08c3a6
-
08c3a6
-  if (CPU_FEATURE_USABLE_P (cpu_features, AVX512F)
08c3a6
-      && !CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_AVX512))
08c3a6
-    {
08c3a6
-      if (CPU_FEATURE_USABLE_P (cpu_features, AVX512VL)
08c3a6
-          && CPU_FEATURE_USABLE_P (cpu_features, AVX512BW)
08c3a6
-          && CPU_FEATURE_USABLE_P (cpu_features, BMI2))
08c3a6
-	{
08c3a6
-	  if (CPU_FEATURE_USABLE_P (cpu_features, ERMS))
08c3a6
-	    return OPTIMIZE1 (avx512_unaligned_erms);
08c3a6
-
08c3a6
-	  return OPTIMIZE1 (avx512_unaligned);
08c3a6
-	}
08c3a6
-    }
08c3a6
-
08c3a6
-  if (CPU_FEATURE_USABLE_P (cpu_features, AVX2))
08c3a6
-    {
08c3a6
-      if (CPU_FEATURE_USABLE_P (cpu_features, AVX512VL)
08c3a6
-          && CPU_FEATURE_USABLE_P (cpu_features, AVX512BW)
08c3a6
-          && CPU_FEATURE_USABLE_P (cpu_features, BMI2))
08c3a6
-	{
08c3a6
-	  if (CPU_FEATURE_USABLE_P (cpu_features, ERMS))
08c3a6
-	    return OPTIMIZE1 (evex_unaligned_erms);
08c3a6
-
08c3a6
-	  return OPTIMIZE1 (evex_unaligned);
08c3a6
-	}
08c3a6
-
08c3a6
-      if (CPU_FEATURE_USABLE_P (cpu_features, RTM))
08c3a6
-	{
08c3a6
-	  if (CPU_FEATURE_USABLE_P (cpu_features, ERMS))
08c3a6
-	    return OPTIMIZE1 (avx2_unaligned_erms_rtm);
08c3a6
-
08c3a6
-	  return OPTIMIZE1 (avx2_unaligned_rtm);
08c3a6
-	}
08c3a6
-
08c3a6
-      if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER))
08c3a6
-	{
08c3a6
-	  if (CPU_FEATURE_USABLE_P (cpu_features, ERMS))
08c3a6
-	    return OPTIMIZE1 (avx2_unaligned_erms);
08c3a6
-
08c3a6
-	  return OPTIMIZE1 (avx2_unaligned);
08c3a6
-	}
08c3a6
-    }
08c3a6
-
08c3a6
-  if (CPU_FEATURE_USABLE_P (cpu_features, ERMS))
08c3a6
-    return OPTIMIZE1 (sse2_unaligned_erms);
08c3a6
-
08c3a6
-  return OPTIMIZE1 (sse2_unaligned);
08c3a6
-}
08c3a6
-
08c3a6
-libc_ifunc_redirected (__redirect___bzero, __bzero, IFUNC_SELECTOR ());
08c3a6
-
08c3a6
-weak_alias (__bzero, bzero)
08c3a6
-#endif
08c3a6
diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
08c3a6
index e5e48b36c3175e68..d990a7149489efd9 100644
08c3a6
--- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c
08c3a6
+++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
08c3a6
@@ -280,48 +280,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
08c3a6
 			      __memset_avx512_no_vzeroupper)
08c3a6
 	     )
08c3a6
 
08c3a6
-  /* Support sysdeps/x86_64/multiarch/bzero.c.  */
08c3a6
-  IFUNC_IMPL (i, name, bzero,
08c3a6
-	      IFUNC_IMPL_ADD (array, i, bzero, 1,
08c3a6
-			      __bzero_sse2_unaligned)
08c3a6
-	      IFUNC_IMPL_ADD (array, i, bzero, 1,
08c3a6
-			      __bzero_sse2_unaligned_erms)
08c3a6
-	      IFUNC_IMPL_ADD (array, i, bzero,
08c3a6
-			      CPU_FEATURE_USABLE (AVX2),
08c3a6
-			      __bzero_avx2_unaligned)
08c3a6
-	      IFUNC_IMPL_ADD (array, i, bzero,
08c3a6
-			      CPU_FEATURE_USABLE (AVX2),
08c3a6
-			      __bzero_avx2_unaligned_erms)
08c3a6
-	      IFUNC_IMPL_ADD (array, i, bzero,
08c3a6
-			      (CPU_FEATURE_USABLE (AVX2)
08c3a6
-			       && CPU_FEATURE_USABLE (RTM)),
08c3a6
-			      __bzero_avx2_unaligned_rtm)
08c3a6
-	      IFUNC_IMPL_ADD (array, i, bzero,
08c3a6
-			      (CPU_FEATURE_USABLE (AVX2)
08c3a6
-			       && CPU_FEATURE_USABLE (RTM)),
08c3a6
-			      __bzero_avx2_unaligned_erms_rtm)
08c3a6
-	      IFUNC_IMPL_ADD (array, i, bzero,
08c3a6
-			      (CPU_FEATURE_USABLE (AVX512VL)
08c3a6
-			       && CPU_FEATURE_USABLE (AVX512BW)
08c3a6
-			       && CPU_FEATURE_USABLE (BMI2)),
08c3a6
-			      __bzero_evex_unaligned)
08c3a6
-	      IFUNC_IMPL_ADD (array, i, bzero,
08c3a6
-			      (CPU_FEATURE_USABLE (AVX512VL)
08c3a6
-			       && CPU_FEATURE_USABLE (AVX512BW)
08c3a6
-			       && CPU_FEATURE_USABLE (BMI2)),
08c3a6
-			      __bzero_evex_unaligned_erms)
08c3a6
-	      IFUNC_IMPL_ADD (array, i, bzero,
08c3a6
-			      (CPU_FEATURE_USABLE (AVX512VL)
08c3a6
-			       && CPU_FEATURE_USABLE (AVX512BW)
08c3a6
-			       && CPU_FEATURE_USABLE (BMI2)),
08c3a6
-			      __bzero_avx512_unaligned_erms)
08c3a6
-	      IFUNC_IMPL_ADD (array, i, bzero,
08c3a6
-			      (CPU_FEATURE_USABLE (AVX512VL)
08c3a6
-			       && CPU_FEATURE_USABLE (AVX512BW)
08c3a6
-			       && CPU_FEATURE_USABLE (BMI2)),
08c3a6
-			      __bzero_avx512_unaligned)
08c3a6
-	     )
08c3a6
-
08c3a6
   /* Support sysdeps/x86_64/multiarch/rawmemchr.c.  */
08c3a6
   IFUNC_IMPL (i, name, rawmemchr,
08c3a6
 	      IFUNC_IMPL_ADD (array, i, rawmemchr,
08c3a6
diff --git a/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms-rtm.S b/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms-rtm.S
08c3a6
index 5a5ee6f67299400b..8ac3e479bba488be 100644
08c3a6
--- a/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms-rtm.S
08c3a6
+++ b/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms-rtm.S
08c3a6
@@ -5,7 +5,6 @@
08c3a6
 
08c3a6
 #define SECTION(p) p##.avx.rtm
08c3a6
 #define MEMSET_SYMBOL(p,s)	p##_avx2_##s##_rtm
08c3a6
-#define BZERO_SYMBOL(p,s)	p##_avx2_##s##_rtm
08c3a6
 #define WMEMSET_SYMBOL(p,s)	p##_avx2_##s##_rtm
08c3a6
 
08c3a6
 #include "memset-avx2-unaligned-erms.S"
08c3a6
diff --git a/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms.S
08c3a6
index a093a2831f3dfa0d..c0bf2875d03d51ab 100644
08c3a6
--- a/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms.S
08c3a6
+++ b/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms.S
08c3a6
@@ -14,9 +14,6 @@
08c3a6
   vmovd d, %xmm0; \
08c3a6
   movq r, %rax;
08c3a6
 
08c3a6
-# define BZERO_ZERO_VEC0() \
08c3a6
-  vpxor %xmm0, %xmm0, %xmm0
08c3a6
-
08c3a6
 # define WMEMSET_SET_VEC0_AND_SET_RETURN(d, r) \
08c3a6
   MEMSET_SET_VEC0_AND_SET_RETURN(d, r)
08c3a6
 
08c3a6
@@ -32,9 +29,6 @@
08c3a6
 # ifndef MEMSET_SYMBOL
08c3a6
 #  define MEMSET_SYMBOL(p,s)	p##_avx2_##s
08c3a6
 # endif
08c3a6
-# ifndef BZERO_SYMBOL
08c3a6
-#  define BZERO_SYMBOL(p,s)	p##_avx2_##s
08c3a6
-# endif
08c3a6
 # ifndef WMEMSET_SYMBOL
08c3a6
 #  define WMEMSET_SYMBOL(p,s)	p##_avx2_##s
08c3a6
 # endif
08c3a6
diff --git a/sysdeps/x86_64/multiarch/memset-avx512-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-avx512-unaligned-erms.S
08c3a6
index 727c92133a15900f..5241216a77bf72b7 100644
08c3a6
--- a/sysdeps/x86_64/multiarch/memset-avx512-unaligned-erms.S
08c3a6
+++ b/sysdeps/x86_64/multiarch/memset-avx512-unaligned-erms.S
08c3a6
@@ -19,9 +19,6 @@
08c3a6
   vpbroadcastb d, %VEC0; \
08c3a6
   movq r, %rax
08c3a6
 
08c3a6
-# define BZERO_ZERO_VEC0() \
08c3a6
-  vpxorq %XMM0, %XMM0, %XMM0
08c3a6
-
08c3a6
 # define WMEMSET_SET_VEC0_AND_SET_RETURN(d, r) \
08c3a6
   vpbroadcastd d, %VEC0; \
08c3a6
   movq r, %rax
08c3a6
diff --git a/sysdeps/x86_64/multiarch/memset-evex-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-evex-unaligned-erms.S
08c3a6
index 5d8fa78f05476b10..637002150659123c 100644
08c3a6
--- a/sysdeps/x86_64/multiarch/memset-evex-unaligned-erms.S
08c3a6
+++ b/sysdeps/x86_64/multiarch/memset-evex-unaligned-erms.S
08c3a6
@@ -19,9 +19,6 @@
08c3a6
   vpbroadcastb d, %VEC0; \
08c3a6
   movq r, %rax
08c3a6
 
08c3a6
-# define BZERO_ZERO_VEC0() \
08c3a6
-  vpxorq %XMM0, %XMM0, %XMM0
08c3a6
-
08c3a6
 # define WMEMSET_SET_VEC0_AND_SET_RETURN(d, r) \
08c3a6
   vpbroadcastd d, %VEC0; \
08c3a6
   movq r, %rax
08c3a6
diff --git a/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
08c3a6
index 2951f7f5f70e274a..c47f3a9c955508a2 100644
08c3a6
--- a/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
08c3a6
+++ b/sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S
08c3a6
@@ -22,7 +22,6 @@
08c3a6
 
08c3a6
 #if IS_IN (libc)
08c3a6
 # define MEMSET_SYMBOL(p,s)	p##_sse2_##s
08c3a6
-# define BZERO_SYMBOL(p,s)	MEMSET_SYMBOL (p, s)
08c3a6
 # define WMEMSET_SYMBOL(p,s)	p##_sse2_##s
08c3a6
 
08c3a6
 # ifdef SHARED
08c3a6
diff --git a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
08c3a6
index d9c577fb5ff9700f..abc12d9cda1b3843 100644
08c3a6
--- a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
08c3a6
+++ b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
08c3a6
@@ -1,5 +1,5 @@
08c3a6
-/* memset/bzero with unaligned store and rep stosb
08c3a6
-   Copyright (C) 2016-2021 Free Software Foundation, Inc.
08c3a6
+/* memset with unaligned store and rep stosb
08c3a6
+   Copyright (C) 2016-2022 Free Software Foundation, Inc.
08c3a6
    This file is part of the GNU C Library.
08c3a6
 
08c3a6
    The GNU C Library is free software; you can redistribute it and/or
08c3a6
@@ -26,10 +26,6 @@
08c3a6
 
08c3a6
 #include <sysdep.h>
08c3a6
 
08c3a6
-#ifndef BZERO_SYMBOL
08c3a6
-# define BZERO_SYMBOL(p,s)		MEMSET_SYMBOL (p, s)
08c3a6
-#endif
08c3a6
-
08c3a6
 #ifndef MEMSET_CHK_SYMBOL
08c3a6
 # define MEMSET_CHK_SYMBOL(p,s)		MEMSET_SYMBOL(p, s)
08c3a6
 #endif
08c3a6
@@ -134,31 +130,6 @@ ENTRY (WMEMSET_SYMBOL (__wmemset, unaligned))
08c3a6
 END (WMEMSET_SYMBOL (__wmemset, unaligned))
08c3a6
 #endif
08c3a6
 
08c3a6
-ENTRY (BZERO_SYMBOL(__bzero, unaligned))
08c3a6
-#if VEC_SIZE > 16
08c3a6
-	BZERO_ZERO_VEC0 ()
08c3a6
-#endif
08c3a6
-	mov	%RDI_LP, %RAX_LP
08c3a6
-	mov	%RSI_LP, %RDX_LP
08c3a6
-#ifndef USE_LESS_VEC_MASK_STORE
08c3a6
-	xorl	%esi, %esi
08c3a6
-#endif
08c3a6
-	cmp	$VEC_SIZE, %RDX_LP
08c3a6
-	jb	L(less_vec_no_vdup)
08c3a6
-#ifdef USE_LESS_VEC_MASK_STORE
08c3a6
-	xorl	%esi, %esi
08c3a6
-#endif
08c3a6
-#if VEC_SIZE <= 16
08c3a6
-	BZERO_ZERO_VEC0 ()
08c3a6
-#endif
08c3a6
-	cmp	$(VEC_SIZE * 2), %RDX_LP
08c3a6
-	ja	L(more_2x_vec)
08c3a6
-	/* From VEC and to 2 * VEC.  No branch when size == VEC_SIZE.  */
08c3a6
-	VMOVU	%VEC(0), (%rdi)
08c3a6
-	VMOVU	%VEC(0), (VEC_SIZE * -1)(%rdi, %rdx)
08c3a6
-	VZEROUPPER_RETURN
08c3a6
-END (BZERO_SYMBOL(__bzero, unaligned))
08c3a6
-
08c3a6
 #if defined SHARED && IS_IN (libc)
08c3a6
 ENTRY_CHK (MEMSET_CHK_SYMBOL (__memset_chk, unaligned))
08c3a6
 	cmp	%RDX_LP, %RCX_LP
08c3a6
@@ -216,31 +187,6 @@ END (__memset_erms)
08c3a6
 END (MEMSET_SYMBOL (__memset, erms))
08c3a6
 # endif
08c3a6
 
08c3a6
-ENTRY_P2ALIGN (BZERO_SYMBOL(__bzero, unaligned_erms), 6)
08c3a6
-# if VEC_SIZE > 16
08c3a6
-	BZERO_ZERO_VEC0 ()
08c3a6
-# endif
08c3a6
-	mov	%RDI_LP, %RAX_LP
08c3a6
-	mov	%RSI_LP, %RDX_LP
08c3a6
-# ifndef USE_LESS_VEC_MASK_STORE
08c3a6
-	xorl	%esi, %esi
08c3a6
-# endif
08c3a6
-	cmp	$VEC_SIZE, %RDX_LP
08c3a6
-	jb	L(less_vec_no_vdup)
08c3a6
-# ifdef USE_LESS_VEC_MASK_STORE
08c3a6
-	xorl	%esi, %esi
08c3a6
-# endif
08c3a6
-# if VEC_SIZE <= 16
08c3a6
-	BZERO_ZERO_VEC0 ()
08c3a6
-# endif
08c3a6
-	cmp	$(VEC_SIZE * 2), %RDX_LP
08c3a6
-	ja	L(stosb_more_2x_vec)
08c3a6
-	/* From VEC and to 2 * VEC.  No branch when size == VEC_SIZE.  */
08c3a6
-	VMOVU	%VEC(0), (%rdi)
08c3a6
-	VMOVU	%VEC(0), (VEC_SIZE * -1)(%rdi, %rdx)
08c3a6
-	VZEROUPPER_RETURN
08c3a6
-END (BZERO_SYMBOL(__bzero, unaligned_erms))
08c3a6
-
08c3a6
 # if defined SHARED && IS_IN (libc)
08c3a6
 ENTRY_CHK (MEMSET_CHK_SYMBOL (__memset_chk, unaligned_erms))
08c3a6
 	cmp	%RDX_LP, %RCX_LP
08c3a6
@@ -282,7 +228,6 @@ L(last_2x_vec):
08c3a6
 #ifdef USE_LESS_VEC_MASK_STORE
08c3a6
 	.p2align 4,, 10
08c3a6
 L(less_vec):
08c3a6
-L(less_vec_no_vdup):
08c3a6
 L(less_vec_from_wmemset):
08c3a6
 	/* Less than 1 VEC.  */
08c3a6
 # if VEC_SIZE != 16 && VEC_SIZE != 32 && VEC_SIZE != 64
08c3a6
@@ -430,9 +375,6 @@ L(less_vec):
08c3a6
 	   xmm). This is only does anything for AVX2.  */
08c3a6
 	MEMSET_VDUP_TO_VEC0_LOW ()
08c3a6
 L(less_vec_from_wmemset):
08c3a6
-#if VEC_SIZE > 16
08c3a6
-L(less_vec_no_vdup):
08c3a6
-#endif
08c3a6
 #endif
08c3a6
 L(cross_page):
08c3a6
 #if VEC_SIZE > 32
08c3a6
@@ -445,9 +387,6 @@ L(cross_page):
08c3a6
 #endif
08c3a6
 #ifndef USE_XMM_LESS_VEC
08c3a6
 	MOVQ	%XMM0, %SET_REG64
08c3a6
-#endif
08c3a6
-#if VEC_SIZE <= 16
08c3a6
-L(less_vec_no_vdup):
08c3a6
 #endif
08c3a6
 	cmpl	$8, %edx
08c3a6
 	jge	L(between_8_15)