@@ -37,7 +37,7 @@ bench := $(foreach B,$(filter bench-%,${BENCHSET}), ${${B}})
 endif
Â
 # String function benchmarks.
-string-benchset := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \
+string-benchset := memccpy memchr memcmp memcpy memmem memmove \
                   mempcpy memset rawmemchr stpcpy stpncpy strcasecmp strcasestr \
                   strcat strchr strchrnul strcmp strcpy strcspn strlen \
                   strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \
deleted file mode 100644
@@ -1,20 +0,0 @@
-/* Measure bcopy functions.
-Â Â Copyright (C) 2013-2018 Free Software Foundation, Inc.
-Â Â This file is part of the GNU C Library.
-
-Â Â The GNU C Library is free software; you can redistribute it and/or
-Â Â modify it under the terms of the GNU Lesser General Public
-Â Â License as published by the Free Software Foundation; either
-Â Â version 2.1 of the License, or (at your option) any later version.
-
-Â Â The GNU C Library is distributed in the hope that it will be useful,
-Â Â but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Â Â Lesser General Public License for more details.
-
-Â Â You should have received a copy of the GNU Lesser General Public
-Â Â License along with the GNU C Library; if not, see
-  <http://www.gnu.org/licenses/>. */
-
-#define TEST_BCOPY
-#include "bench-memmove.c"
deleted file mode 100644
@@ -1,19 +0,0 @@
-/* Measure bzero functions.
-Â Â Copyright (C) 2013-2018 Free Software Foundation, Inc.
-Â Â This file is part of the GNU C Library.
-
-Â Â The GNU C Library is free software; you can redistribute it and/or
-Â Â modify it under the terms of the GNU Lesser General Public
-Â Â License as published by the Free Software Foundation; either
-Â Â version 2.1 of the License, or (at your option) any later version.
-
-Â Â The GNU C Library is distributed in the hope that it will be useful,
-Â Â but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Â Â Lesser General Public License for more details.
-
-Â Â You should have received a copy of the GNU Lesser General Public
-Â Â License along with the GNU C Library; if not, see
-  <http://www.gnu.org/licenses/>. */
-#define TEST_BZERO
-#include "bench-memset.c"
@@ -20,28 +20,8 @@
 #define TEST_NAME "memccpy"
 #include "bench-string.h"
Â
-void *simple_memccpy (void *, const void *, int, size_t);
-void *stupid_memccpy (void *, const void *, int, size_t);
-
-IMPL (stupid_memccpy, 0)
-IMPL (simple_memccpy, 0)
-IMPL (memccpy, 1)
-
-void *
-simple_memccpy (void *dst, const void *src, int c, size_t n)
-{
-Â const char *s = src;
-Â char *d = dst;
-
-Â while (n-- > 0)
-Â Â Â if ((*d++ = *s++) == (char) c)
-Â Â Â Â Â return d;
-
-Â return NULL;
-}
-
 void *
-stupid_memccpy (void *dst, const void *src, int c, size_t n)
+generic_memccpy (void *dst, const void *src, int c, size_t n)
 {
  void *p = memchr (src, c, n);
Â
@@ -52,6 +32,9 @@ stupid_memccpy (void *dst, const void *src, int c, size_t n)
  return NULL;
 }
Â
+IMPL (memccpy, 1)
+IMPL (generic_memccpy, 0)
+
 typedef void *(*proto_t) (void *, const void *, int c, size_t);
Â
 static void
@@ -23,13 +23,6 @@
 # define TEST_NAME "memcpy"
 # include "bench-string.h"
Â
-char *simple_memcpy (char *, const char *, size_t);
-char *builtin_memcpy (char *, const char *, size_t);
-
-IMPL (simple_memcpy, 0)
-IMPL (builtin_memcpy, 0)
-IMPL (memcpy, 1)
-
 char *
 simple_memcpy (char *dst, const char *src, size_t n)
 {
@@ -44,6 +37,11 @@ builtin_memcpy (char *dst, const char *src, size_t n)
 {
  return __builtin_memcpy (dst, src, n);
 }
+
+IMPL (memcpy, 1)
+IMPL (builtin_memcpy, 0)
+IMPL (simple_memcpy, 0)
+
 #endif
Â
 # include "json-lib.h"
@@ -17,34 +17,16 @@
   <http://www.gnu.org/licenses/>. */
Â
 #define TEST_MAIN
-#ifdef TEST_BCOPY
-# define TEST_NAME "bcopy"
-#else
-# define TEST_NAME "memmove"
-#endif
+#define TEST_NAME "memmove"
 #include "bench-string.h"
 #include "json-lib.h"
Â
 char *simple_memmove (char *, const char *, size_t);
Â
-#ifdef TEST_BCOPY
-typedef void (*proto_t) (const char *, char *, size_t);
-void simple_bcopy (const char *, char *, size_t);
-
-IMPL (simple_bcopy, 0)
-IMPL (bcopy, 1)
-
-void
-simple_bcopy (const char *src, char *dst, size_t n)
-{
-Â simple_memmove (dst, src, n);
-}
-#else
 typedef char *(*proto_t) (char *, const char *, size_t);
Â
-IMPL (simple_memmove, 0)
 IMPL (memmove, 1)
-#endif
+IMPL (simple_memmove, 0)
Â
 char *
 inhibit_loop_to_libcall
@@ -74,11 +56,7 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, const
  TIMING_NOW (start);
  for (i = 0; i < iters; ++i)
    {
-#ifdef TEST_BCOPY
-Â Â Â Â Â CALL (impl, src, dst, len);
-#else
      CALL (impl, dst, src, len);
-#endif
    }
  TIMING_NOW (stop);
Â
@@ -21,17 +21,13 @@
 #define TEST_NAME "mempcpy"
 #include "bench-string.h"
Â
-char *simple_mempcpy (char *, const char *, size_t);
-
-IMPL (simple_mempcpy, 0)
-IMPL (mempcpy, 1)
-
 char *
-simple_mempcpy (char *dst, const char *src, size_t n)
+generic_mempcpy (char *dst, const char *src, size_t n)
 {
-Â while (n--)
-Â Â Â *dst++ = *src++;
-Â return dst;
+Â return memcpy (dst, src, n) + n;
 }
Â
+IMPL (mempcpy, 1)
+IMPL (generic_mempcpy, 0)
+
 #include "bench-memcpy.c"
@@ -17,66 +17,32 @@
   <http://www.gnu.org/licenses/>. */
Â
 #define TEST_MAIN
-#ifdef TEST_BZERO
-# define TEST_NAME "bzero"
-#else
-# ifndef WIDE
-#Â define TEST_NAME "memset"
-# else
-#Â define TEST_NAME "wmemset"
-# endif /* WIDE */
-#endif /* !TEST_BZERO */
-#define MIN_PAGE_SIZE 131072
-#include "bench-string.h"
-
 #ifndef WIDE
-# define SIMPLE_MEMSET simple_memset
+# define TEST_NAME "memset"
 #else
-# define SIMPLE_MEMSET simple_wmemset
+# define TEST_NAME "wmemset"
 #endif /* WIDE */
+#define MIN_PAGE_SIZE 131072
+#include "bench-string.h"
Â
 #include "json-lib.h"
Â
 CHAR *SIMPLE_MEMSET (CHAR *, int, size_t);
Â
-#ifdef TEST_BZERO
-typedef void (*proto_t) (char *, size_t);
-void simple_bzero (char *, size_t);
-void builtin_bzero (char *, size_t);
-
-IMPL (simple_bzero, 0)
-IMPL (builtin_bzero, 0)
-IMPL (bzero, 1)
-
-void
-simple_bzero (char *s, size_t n)
-{
-Â SIMPLE_MEMSET (s, 0, n);
-}
-
-void
-builtin_bzero (char *s, size_t n)
-{
-Â __builtin_bzero (s, n);
-}
-#else
 typedef CHAR *(*proto_t) (CHAR *, int, size_t);
Â
-IMPL (SIMPLE_MEMSET, 0)
-# ifndef WIDE
-char *builtin_memset (char *, int, size_t);
-IMPL (builtin_memset, 0)
-# endif /* !WIDE */
 IMPL (MEMSET, 1)
+IMPL (SIMPLE_MEMSET, 0)
Â
-# ifndef WIDE
+#ifndef WIDE
 char *
 builtin_memset (char *s, int c, size_t n)
 {
  return __builtin_memset (s, c, n);
 }
-# endif /* !WIDE */
-#endif /* !TEST_BZERO */
+
+IMPL (builtin_memset, 0)
+#endif /* !WIDE */
Â
 CHAR *
 inhibit_loop_to_libcall
@@ -95,14 +61,12 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s,
  size_t i, iters = INNER_LOOP_ITERS;
  timing_t start, stop, cur;
Â
+Â memset (s, 0, n);
+
  TIMING_NOW (start);
  for (i = 0; i < iters; ++i)
    {
-#ifdef TEST_BZERO
-Â Â Â Â Â CALL (impl, s, n);
-#else
      CALL (impl, s, c, n);
-#endif /* !TEST_BZERO */
    }
  TIMING_NOW (stop);
Â
@@ -159,9 +123,7 @@ test_main (void)
Â
  json_array_begin (&json_ctx, "results");
Â
-#ifndef TEST_BZERO
  for (c = -65; c <= 130; c += 65)
-#endif
    {
      for (i = 0; i < 18; ++i)
        do_test (&json_ctx, 0, c, 1 << i);
@@ -23,20 +23,18 @@
 #include "bench-string.h"
Â
 typedef char *(*proto_t) (const char *, int);
-char *simple_rawmemchr (const char *, int);
-
-IMPL (simple_rawmemchr, 0)
-IMPL (rawmemchr, 1)
Â
 char *
-simple_rawmemchr (const char *s, int c)
+generic_rawmemchr (const char *s, int c)
 {
-Â while (1)
-Â Â Â if (*s++ == (char) c)
-Â Â Â Â Â return (char *) s - 1;
-Â return NULL;
+Â if (c != 0)
+Â Â Â return memchr (s, c, PTRDIFF_MAX);
+Â return (char *)s + strlen (s);
 }
Â
+IMPL (rawmemchr, 1)
+IMPL (generic_rawmemchr, 0)
+
 static void
 do_one_test (impl_t *impl, const char *s, int c, char *exp_res)
 {