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