diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2019-08-29 15:45:49 +0100 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2019-08-30 17:21:35 +0100 |
commit | 3c05dd79d04da765b1ec93ea97474b3b8d9e0af3 (patch) | |
tree | 7765a34bee154154bcd8e48d934ec661cfbab7a9 /string | |
parent | 9743c6272df3d4f4c37cc98e68fab83bf3f57efb (diff) | |
download | glibc-3c05dd79d04da765b1ec93ea97474b3b8d9e0af3.zip glibc-3c05dd79d04da765b1ec93ea97474b3b8d9e0af3.tar.gz glibc-3c05dd79d04da765b1ec93ea97474b3b8d9e0af3.tar.bz2 |
Use generic memset/memcpy/memmove in benchtests
Use the generic C memset/memcpy/memmove in benchtests since comparing
against a slow byte-oriented implementation makes no sense.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-08-29 Wilco Dijkstra <wdijkstr@arm.com>
* benchtests/bench-memcpy.c (simple_memcpy): Remove.
(generic_memcpy): Include generic C memcpy.
* benchtests/bench-memmove.c (simple_memmove): Remove.
(generic_memmove): Include generic C memmove.
* benchtests/bench-memset.c (simple_memset): Remove.
(generic_memset): Include generic C memset.
* benchtests/bench-memset-large.c (simple_memset): Remove.
(generic_memset): Include generic C memset.
* benchtests/bench-memset-walk.c (simple_memset): Remove.
(generic_memset): Include generic C memset.
* string/memcpy.c (MEMCPY): Add defines to enable redirection.
* string/memset.c (MEMSET): Likewise.
* sysdeps/x86_64/memcopy.h: Remove empty file.
Diffstat (limited to 'string')
-rw-r--r-- | string/memcpy.c | 8 | ||||
-rw-r--r-- | string/memset.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/string/memcpy.c b/string/memcpy.c index a1c4c72..2315b6f 100644 --- a/string/memcpy.c +++ b/string/memcpy.c @@ -21,10 +21,12 @@ #include <string.h> #include <memcopy.h> -#undef memcpy +#ifndef MEMCPY +# define MEMCPY memcpy +#endif void * -memcpy (void *dstpp, const void *srcpp, size_t len) +MEMCPY (void *dstpp, const void *srcpp, size_t len) { unsigned long int dstp = (long int) dstpp; unsigned long int srcp = (long int) srcpp; @@ -57,4 +59,4 @@ memcpy (void *dstpp, const void *srcpp, size_t len) return dstpp; } -libc_hidden_builtin_def (memcpy) +libc_hidden_builtin_def (MEMCPY) diff --git a/string/memset.c b/string/memset.c index 4ac8cb6..950445c 100644 --- a/string/memset.c +++ b/string/memset.c @@ -18,11 +18,13 @@ #include <string.h> #include <memcopy.h> -#undef memset +#ifndef MEMSET +# define MEMSET memset +#endif void * inhibit_loop_to_libcall -memset (void *dstpp, int c, size_t len) +MEMSET (void *dstpp, int c, size_t len) { long int dstp = (long int) dstpp; @@ -85,4 +87,4 @@ memset (void *dstpp, int c, size_t len) return dstpp; } -libc_hidden_builtin_def (memset) +libc_hidden_builtin_def (MEMSET) |