diff mbox series

[v1,3/3] x86: Rename generic functions with unique postfix for clarity

Message ID 20220609041653.2515397-3-goldstein.w.n@gmail.com
State New
Headers show
Series [v1,1/3] x86: Align varshift table to 32-bytes | expand

Commit Message

Noah Goldstein June 9, 2022, 4:16 a.m. UTC
No functions are changed. It just renames generic implementations from
'{func}_sse2' to '{func}_generic'. This is just because the postfix
"_sse2" was overloaded and was used for files that had hand-optimized
sse2 assembly implementations and files that just redirected back
to the generic implementation.

Full xcheck passed on x86_64.
---
 sysdeps/x86_64/multiarch/Makefile                |  6 +++---
 sysdeps/x86_64/multiarch/ifunc-avx.h             |  4 ++--
 sysdeps/x86_64/multiarch/ifunc-impl-list.c       | 16 ++++++++--------
 sysdeps/x86_64/multiarch/ifunc-strcpy.h          |  8 ++++++--
 sysdeps/x86_64/multiarch/ifunc-wcslen.h          |  8 ++++++--
 sysdeps/x86_64/multiarch/stpncpy-c.c             |  2 +-
 sysdeps/x86_64/multiarch/stpncpy.c               |  1 +
 sysdeps/x86_64/multiarch/strcspn-c-sse4.c        |  2 +-
 .../multiarch/{strcspn-sse2.c => strcspn-c.c}    |  2 +-
 sysdeps/x86_64/multiarch/strncat-c.c             |  2 +-
 sysdeps/x86_64/multiarch/strncat.c               |  1 +
 sysdeps/x86_64/multiarch/strncpy-c.c             |  2 +-
 sysdeps/x86_64/multiarch/strncpy.c               |  1 +
 sysdeps/x86_64/multiarch/strpbrk-c-avx.c         |  2 +-
 sysdeps/x86_64/multiarch/strpbrk-c-sse4.c        |  2 +-
 .../multiarch/{strpbrk-sse2.c => strpbrk-c.c}    |  2 +-
 sysdeps/x86_64/multiarch/strspn-c-sse4.c         |  4 ++--
 .../multiarch/{strspn-sse2.c => strspn-c.c}      |  2 +-
 sysdeps/x86_64/multiarch/wcscpy-c.c              |  2 +-
 sysdeps/x86_64/multiarch/wcscpy.c                |  4 ++--
 sysdeps/x86_64/multiarch/wcsnlen-c.c             |  4 ++--
 sysdeps/x86_64/multiarch/wcsnlen.c               |  1 +
 22 files changed, 45 insertions(+), 33 deletions(-)
 rename sysdeps/x86_64/multiarch/{strcspn-sse2.c => strcspn-c.c} (96%)
 rename sysdeps/x86_64/multiarch/{strpbrk-sse2.c => strpbrk-c.c} (96%)
 rename sysdeps/x86_64/multiarch/{strspn-sse2.c => strspn-c.c} (96%)
diff mbox series

Patch

diff --git a/sysdeps/x86_64/multiarch/Makefile b/sysdeps/x86_64/multiarch/Makefile
index 27f306c7c8..9b1e0add1a 100644
--- a/sysdeps/x86_64/multiarch/Makefile
+++ b/sysdeps/x86_64/multiarch/Makefile
@@ -76,9 +76,9 @@  sysdep_routines += \
   strcpy-evex \
   strcpy-sse2 \
   strcpy-sse2-unaligned \
+  strcspn-c \
   strcspn-c-avx \
   strcspn-c-sse4 \
-  strcspn-sse2 \
   strlen-avx2 \
   strlen-avx2-rtm \
   strlen-evex \
@@ -109,16 +109,16 @@  sysdep_routines += \
   strnlen-evex \
   strnlen-evex512 \
   strnlen-sse2 \
+  strpbrk-c \
   strpbrk-c-avx \
   strpbrk-c-sse4 \
-  strpbrk-sse2 \
   strrchr-avx2 \
   strrchr-avx2-rtm \
   strrchr-evex \
   strrchr-sse2 \
+  strspn-c \
   strspn-c-avx \
   strspn-c-sse4 \
-  strspn-sse2 \
   strstr-avx512 \
   strstr-sse2-unaligned \
   varshift \
diff --git a/sysdeps/x86_64/multiarch/ifunc-avx.h b/sysdeps/x86_64/multiarch/ifunc-avx.h
index 891f3ddcac..30efbd29d0 100644
--- a/sysdeps/x86_64/multiarch/ifunc-avx.h
+++ b/sysdeps/x86_64/multiarch/ifunc-avx.h
@@ -19,7 +19,7 @@ 
 
 #include <init-arch.h>
 
-extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
+extern __typeof (REDIRECT_NAME) OPTIMIZE (generic) attribute_hidden;
 extern __typeof (REDIRECT_NAME) OPTIMIZE (sse42) attribute_hidden;
 extern __typeof (REDIRECT_NAME) OPTIMIZE (avx) attribute_hidden;
 
@@ -34,5 +34,5 @@  IFUNC_SELECTOR (void)
   if (CPU_FEATURE_USABLE_P (cpu_features, SSE4_2))
     return OPTIMIZE (sse42);
 
-  return OPTIMIZE (sse2);
+  return OPTIMIZE (generic);
 }
diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
index 507c563669..23a2d7114d 100644
--- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c
+++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
@@ -372,7 +372,7 @@  __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __stpncpy_evex)
 	      IFUNC_IMPL_ADD (array, i, stpncpy, 1,
 			      __stpncpy_sse2_unaligned)
-	      IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_sse2))
+	      IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_generic))
 
   /* Support sysdeps/x86_64/multiarch/stpcpy.c.  */
   IFUNC_IMPL (i, name, stpcpy,
@@ -533,7 +533,7 @@  __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __strcspn_avx)
 	      IFUNC_IMPL_ADD (array, i, strcspn, CPU_FEATURE_USABLE (SSE4_2),
 			      __strcspn_sse42)
-	      IFUNC_IMPL_ADD (array, i, strcspn, 1, __strcspn_sse2))
+	      IFUNC_IMPL_ADD (array, i, strcspn, 1, __strcspn_generic))
 
   /* Support sysdeps/x86_64/multiarch/strncase_l.c.  */
   IFUNC_IMPL (i, name, strncasecmp,
@@ -587,7 +587,7 @@  __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __strncat_evex)
 	      IFUNC_IMPL_ADD (array, i, strncat, 1,
 			      __strncat_sse2_unaligned)
-	      IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_sse2))
+	      IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_generic))
 
   /* Support sysdeps/x86_64/multiarch/strncpy.c.  */
   IFUNC_IMPL (i, name, strncpy,
@@ -603,7 +603,7 @@  __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __strncpy_evex)
 	      IFUNC_IMPL_ADD (array, i, strncpy, 1,
 			      __strncpy_sse2_unaligned)
-	      IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_sse2))
+	      IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_generic))
 
   /* Support sysdeps/x86_64/multiarch/strpbrk.c.  */
   IFUNC_IMPL (i, name, strpbrk,
@@ -611,7 +611,7 @@  __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __strpbrk_avx)
 	      IFUNC_IMPL_ADD (array, i, strpbrk, CPU_FEATURE_USABLE (SSE4_2),
 			      __strpbrk_sse42)
-	      IFUNC_IMPL_ADD (array, i, strpbrk, 1, __strpbrk_sse2))
+	      IFUNC_IMPL_ADD (array, i, strpbrk, 1, __strpbrk_generic))
 
 
   /* Support sysdeps/x86_64/multiarch/strspn.c.  */
@@ -620,7 +620,7 @@  __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __strspn_avx)
 	      IFUNC_IMPL_ADD (array, i, strspn, CPU_FEATURE_USABLE (SSE4_2),
 			      __strspn_sse42)
-	      IFUNC_IMPL_ADD (array, i, strspn, 1, __strspn_sse2))
+	      IFUNC_IMPL_ADD (array, i, strspn, 1, __strspn_generic))
 
   /* Support sysdeps/x86_64/multiarch/strstr.c.  */
   IFUNC_IMPL (i, name, strstr,
@@ -703,7 +703,7 @@  __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
   IFUNC_IMPL (i, name, wcscpy,
 	      IFUNC_IMPL_ADD (array, i, wcscpy, CPU_FEATURE_USABLE (SSSE3),
 			      __wcscpy_ssse3)
-	      IFUNC_IMPL_ADD (array, i, wcscpy, 1, __wcscpy_sse2))
+	      IFUNC_IMPL_ADD (array, i, wcscpy, 1, __wcscpy_generic))
 
   /* Support sysdeps/x86_64/multiarch/wcslen.c.  */
   IFUNC_IMPL (i, name, wcslen,
@@ -755,7 +755,7 @@  __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 	      IFUNC_IMPL_ADD (array, i, wcsnlen,
 			      CPU_FEATURE_USABLE (SSE4_1),
 			      __wcsnlen_sse4_1)
-	      IFUNC_IMPL_ADD (array, i, wcsnlen, 1, __wcsnlen_sse2))
+	      IFUNC_IMPL_ADD (array, i, wcsnlen, 1, __wcsnlen_generic))
 
   /* Support sysdeps/x86_64/multiarch/wmemchr.c.  */
   IFUNC_IMPL (i, name, wmemchr,
diff --git a/sysdeps/x86_64/multiarch/ifunc-strcpy.h b/sysdeps/x86_64/multiarch/ifunc-strcpy.h
index a15afa44e9..80529458d1 100644
--- a/sysdeps/x86_64/multiarch/ifunc-strcpy.h
+++ b/sysdeps/x86_64/multiarch/ifunc-strcpy.h
@@ -20,7 +20,11 @@ 
 
 #include <init-arch.h>
 
-extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
+#ifndef GENERIC
+# define GENERIC sse2
+#endif
+
+extern __typeof (REDIRECT_NAME) OPTIMIZE (GENERIC) attribute_hidden;
 extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2_unaligned)
   attribute_hidden;
 extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2) attribute_hidden;
@@ -49,5 +53,5 @@  IFUNC_SELECTOR (void)
   if (CPU_FEATURES_ARCH_P (cpu_features, Fast_Unaligned_Load))
     return OPTIMIZE (sse2_unaligned);
 
-  return OPTIMIZE (sse2);
+  return OPTIMIZE (GENERIC);
 }
diff --git a/sysdeps/x86_64/multiarch/ifunc-wcslen.h b/sysdeps/x86_64/multiarch/ifunc-wcslen.h
index 2b29e7608a..88c1c502af 100644
--- a/sysdeps/x86_64/multiarch/ifunc-wcslen.h
+++ b/sysdeps/x86_64/multiarch/ifunc-wcslen.h
@@ -19,7 +19,11 @@ 
 
 #include <init-arch.h>
 
-extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
+#ifndef GENERIC
+# define GENERIC sse2
+#endif
+
+extern __typeof (REDIRECT_NAME) OPTIMIZE (GENERIC) attribute_hidden;
 extern __typeof (REDIRECT_NAME) OPTIMIZE (sse4_1) attribute_hidden;
 extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2) attribute_hidden;
 extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_rtm) attribute_hidden;
@@ -48,5 +52,5 @@  IFUNC_SELECTOR (void)
   if (CPU_FEATURE_USABLE_P (cpu_features, SSE4_1))
     return OPTIMIZE (sse4_1);
 
-  return OPTIMIZE (sse2);
+  return OPTIMIZE (GENERIC);
 }
diff --git a/sysdeps/x86_64/multiarch/stpncpy-c.c b/sysdeps/x86_64/multiarch/stpncpy-c.c
index b016e487e1..eb62fcf388 100644
--- a/sysdeps/x86_64/multiarch/stpncpy-c.c
+++ b/sysdeps/x86_64/multiarch/stpncpy-c.c
@@ -1,4 +1,4 @@ 
-#define STPNCPY __stpncpy_sse2
+#define STPNCPY __stpncpy_generic
 #undef weak_alias
 #define weak_alias(ignored1, ignored2)
 #undef libc_hidden_def
diff --git a/sysdeps/x86_64/multiarch/stpncpy.c b/sysdeps/x86_64/multiarch/stpncpy.c
index 82fa53957d..879bc83f0b 100644
--- a/sysdeps/x86_64/multiarch/stpncpy.c
+++ b/sysdeps/x86_64/multiarch/stpncpy.c
@@ -25,6 +25,7 @@ 
 # undef stpncpy
 # undef __stpncpy
 
+# define GENERIC generic
 # define SYMBOL_NAME stpncpy
 # include "ifunc-strcpy.h"
 
diff --git a/sysdeps/x86_64/multiarch/strcspn-c-sse4.c b/sysdeps/x86_64/multiarch/strcspn-c-sse4.c
index 848c3cfb14..8541035ccb 100644
--- a/sysdeps/x86_64/multiarch/strcspn-c-sse4.c
+++ b/sysdeps/x86_64/multiarch/strcspn-c-sse4.c
@@ -53,7 +53,7 @@ 
    X for case 1.  */
 
 #ifndef STRCSPN_FALLBACK
-# define STRCSPN_FALLBACK __strcspn_sse2
+# define STRCSPN_FALLBACK __strcspn_generic
 #endif
 
 #ifndef STRCSPN
diff --git a/sysdeps/x86_64/multiarch/strcspn-sse2.c b/sysdeps/x86_64/multiarch/strcspn-c.c
similarity index 96%
rename from sysdeps/x86_64/multiarch/strcspn-sse2.c
rename to sysdeps/x86_64/multiarch/strcspn-c.c
index 3a04bb39fc..423de2e2b2 100644
--- a/sysdeps/x86_64/multiarch/strcspn-sse2.c
+++ b/sysdeps/x86_64/multiarch/strcspn-c.c
@@ -19,7 +19,7 @@ 
 #if IS_IN (libc)
 
 # include <sysdep.h>
-# define STRCSPN __strcspn_sse2
+# define STRCSPN __strcspn_generic
 
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(STRCSPN)
diff --git a/sysdeps/x86_64/multiarch/strncat-c.c b/sysdeps/x86_64/multiarch/strncat-c.c
index 93a7fab7ea..b729c033d9 100644
--- a/sysdeps/x86_64/multiarch/strncat-c.c
+++ b/sysdeps/x86_64/multiarch/strncat-c.c
@@ -1,2 +1,2 @@ 
-#define STRNCAT __strncat_sse2
+#define STRNCAT __strncat_generic
 #include <string/strncat.c>
diff --git a/sysdeps/x86_64/multiarch/strncat.c b/sysdeps/x86_64/multiarch/strncat.c
index b649343a97..50fba8a41f 100644
--- a/sysdeps/x86_64/multiarch/strncat.c
+++ b/sysdeps/x86_64/multiarch/strncat.c
@@ -24,6 +24,7 @@ 
 # undef strncat
 
 # define SYMBOL_NAME strncat
+# define GENERIC generic
 # include "ifunc-strcpy.h"
 
 libc_ifunc_redirected (__redirect_strncat, strncat, IFUNC_SELECTOR ());
diff --git a/sysdeps/x86_64/multiarch/strncpy-c.c b/sysdeps/x86_64/multiarch/strncpy-c.c
index 57c45ac7ab..183b0b8e0f 100644
--- a/sysdeps/x86_64/multiarch/strncpy-c.c
+++ b/sysdeps/x86_64/multiarch/strncpy-c.c
@@ -1,4 +1,4 @@ 
-#define STRNCPY __strncpy_sse2
+#define STRNCPY __strncpy_generic
 #undef libc_hidden_builtin_def
 #define libc_hidden_builtin_def(strncpy)
 
diff --git a/sysdeps/x86_64/multiarch/strncpy.c b/sysdeps/x86_64/multiarch/strncpy.c
index 2a780a7e16..7fc7d72ec5 100644
--- a/sysdeps/x86_64/multiarch/strncpy.c
+++ b/sysdeps/x86_64/multiarch/strncpy.c
@@ -24,6 +24,7 @@ 
 # undef strncpy
 
 # define SYMBOL_NAME strncpy
+# define GENERIC generic
 # include "ifunc-strcpy.h"
 
 libc_ifunc_redirected (__redirect_strncpy, strncpy, IFUNC_SELECTOR ());
diff --git a/sysdeps/x86_64/multiarch/strpbrk-c-avx.c b/sysdeps/x86_64/multiarch/strpbrk-c-avx.c
index 2918013994..363daebd9e 100644
--- a/sysdeps/x86_64/multiarch/strpbrk-c-avx.c
+++ b/sysdeps/x86_64/multiarch/strpbrk-c-avx.c
@@ -17,7 +17,7 @@ 
    <https://www.gnu.org/licenses/>.  */
 
 #define USE_AS_STRPBRK
-#define STRCSPN_FALLBACK __strpbrk_sse2
+#define STRCSPN_FALLBACK __strpbrk_generic
 #define STRCSPN __strpbrk_avx
 #define SECTION "avx"
 #include "strcspn-c-sse4.c"
diff --git a/sysdeps/x86_64/multiarch/strpbrk-c-sse4.c b/sysdeps/x86_64/multiarch/strpbrk-c-sse4.c
index 2efd38d809..a02c951dfd 100644
--- a/sysdeps/x86_64/multiarch/strpbrk-c-sse4.c
+++ b/sysdeps/x86_64/multiarch/strpbrk-c-sse4.c
@@ -17,6 +17,6 @@ 
    <https://www.gnu.org/licenses/>.  */
 
 #define USE_AS_STRPBRK
-#define STRCSPN_FALLBACK __strpbrk_sse2
+#define STRCSPN_FALLBACK __strpbrk_generic
 #define STRCSPN __strpbrk_sse42
 #include "strcspn-c-sse4.c"
diff --git a/sysdeps/x86_64/multiarch/strpbrk-sse2.c b/sysdeps/x86_64/multiarch/strpbrk-c.c
similarity index 96%
rename from sysdeps/x86_64/multiarch/strpbrk-sse2.c
rename to sysdeps/x86_64/multiarch/strpbrk-c.c
index d03214c4fb..d31acfe495 100644
--- a/sysdeps/x86_64/multiarch/strpbrk-sse2.c
+++ b/sysdeps/x86_64/multiarch/strpbrk-c.c
@@ -19,7 +19,7 @@ 
 #if IS_IN (libc)
 
 # include <sysdep.h>
-# define STRPBRK __strpbrk_sse2
+# define STRPBRK __strpbrk_generic
 
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(STRPBRK)
diff --git a/sysdeps/x86_64/multiarch/strspn-c-sse4.c b/sysdeps/x86_64/multiarch/strspn-c-sse4.c
index 6a91def2e0..9323a117ab 100644
--- a/sysdeps/x86_64/multiarch/strspn-c-sse4.c
+++ b/sysdeps/x86_64/multiarch/strspn-c-sse4.c
@@ -51,7 +51,7 @@ 
 
    We exit from the loop for case 1.  */
 
-extern size_t __strspn_sse2 (const char *, const char *) attribute_hidden;
+extern size_t __strspn_generic (const char *, const char *) attribute_hidden;
 
 #ifndef STRSPN
 # define STRSPN __strspn_sse42
@@ -105,7 +105,7 @@  STRSPN (const char *s, const char *a)
       /* There is no NULL terminator.  Don't use pcmpstri based approach if the
 	 length of A > 16.  */
       if (a[16] != 0)
-        return __strspn_sse2 (s, a);
+        return __strspn_generic (s, a);
     }
   aligned = s;
   offset = (unsigned int) ((size_t) s & 15);
diff --git a/sysdeps/x86_64/multiarch/strspn-sse2.c b/sysdeps/x86_64/multiarch/strspn-c.c
similarity index 96%
rename from sysdeps/x86_64/multiarch/strspn-sse2.c
rename to sysdeps/x86_64/multiarch/strspn-c.c
index 61cc6cb0a5..6b50c36432 100644
--- a/sysdeps/x86_64/multiarch/strspn-sse2.c
+++ b/sysdeps/x86_64/multiarch/strspn-c.c
@@ -19,7 +19,7 @@ 
 #if IS_IN (libc)
 
 # include <sysdep.h>
-# define STRSPN __strspn_sse2
+# define STRSPN __strspn_generic
 
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(STRSPN)
diff --git a/sysdeps/x86_64/multiarch/wcscpy-c.c b/sysdeps/x86_64/multiarch/wcscpy-c.c
index 26d6984e9b..fa38dd898d 100644
--- a/sysdeps/x86_64/multiarch/wcscpy-c.c
+++ b/sysdeps/x86_64/multiarch/wcscpy-c.c
@@ -1,5 +1,5 @@ 
 #if IS_IN (libc)
-# define WCSCPY  __wcscpy_sse2
+# define WCSCPY  __wcscpy_generic
 #endif
 
 #include <wcsmbs/wcscpy.c>
diff --git a/sysdeps/x86_64/multiarch/wcscpy.c b/sysdeps/x86_64/multiarch/wcscpy.c
index 6a2d1421d9..53c3228dc2 100644
--- a/sysdeps/x86_64/multiarch/wcscpy.c
+++ b/sysdeps/x86_64/multiarch/wcscpy.c
@@ -26,7 +26,7 @@ 
 # define SYMBOL_NAME wcscpy
 # include <init-arch.h>
 
-extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
+extern __typeof (REDIRECT_NAME) OPTIMIZE (generic) attribute_hidden;
 extern __typeof (REDIRECT_NAME) OPTIMIZE (ssse3) attribute_hidden;
 
 static inline void *
@@ -37,7 +37,7 @@  IFUNC_SELECTOR (void)
   if (CPU_FEATURE_USABLE_P (cpu_features, SSSE3))
     return OPTIMIZE (ssse3);
 
-  return OPTIMIZE (sse2);
+  return OPTIMIZE (generic);
 }
 
 libc_ifunc_redirected (__redirect_wcscpy, __wcscpy, IFUNC_SELECTOR ());
diff --git a/sysdeps/x86_64/multiarch/wcsnlen-c.c b/sysdeps/x86_64/multiarch/wcsnlen-c.c
index e1ec7cfbb5..1c9c04241a 100644
--- a/sysdeps/x86_64/multiarch/wcsnlen-c.c
+++ b/sysdeps/x86_64/multiarch/wcsnlen-c.c
@@ -1,9 +1,9 @@ 
 #if IS_IN (libc)
 # include <wchar.h>
 
-# define WCSNLEN __wcsnlen_sse2
+# define WCSNLEN __wcsnlen_generic
 
-extern __typeof (wcsnlen) __wcsnlen_sse2;
+extern __typeof (wcsnlen) __wcsnlen_generic;
 #endif
 
 #include "wcsmbs/wcsnlen.c"
diff --git a/sysdeps/x86_64/multiarch/wcsnlen.c b/sysdeps/x86_64/multiarch/wcsnlen.c
index baa26666a8..05b7a211de 100644
--- a/sysdeps/x86_64/multiarch/wcsnlen.c
+++ b/sysdeps/x86_64/multiarch/wcsnlen.c
@@ -24,6 +24,7 @@ 
 # undef __wcsnlen
 
 # define SYMBOL_NAME wcsnlen
+# define GENERIC generic
 # include "ifunc-wcslen.h"
 
 libc_ifunc_redirected (__redirect_wcsnlen, __wcsnlen, IFUNC_SELECTOR ());