diff mbox series

[5/5] benchtests: Added generic_memcpy and generic_memmove to large benchtests

Message ID 20210317023539.323311-1-naohirot@fujitsu.com
State New
Delegated to: Szabolcs Nagy
Headers show
Series Added optimized memcpy/memmove/memset for A64FX | expand

Commit Message

naohirot@fujitsu.com March 17, 2021, 2:35 a.m. UTC
This patch is to add generic_memcpy and generic_memmove to
bench-memcpy-large.c and bench-memmove-large.c respectively so that we
can compare performance between 512 bit scalable vector register with
scalar 64 bit register consistently among memcpy/memmove/memset
default and large benchtests.
---
 benchtests/bench-memcpy-large.c  | 9 +++++++++
 benchtests/bench-memmove-large.c | 9 +++++++++
 2 files changed, 18 insertions(+)
diff mbox series

Patch

diff --git a/benchtests/bench-memcpy-large.c b/benchtests/bench-memcpy-large.c
index 3df1575514..4a87987202 100644
--- a/benchtests/bench-memcpy-large.c
+++ b/benchtests/bench-memcpy-large.c
@@ -25,7 +25,10 @@ 
 # define TIMEOUT (20 * 60)
 # include "bench-string.h"
 
+void *generic_memcpy (void *, const void *, size_t);
+
 IMPL (memcpy, 1)
+IMPL (generic_memcpy, 0)
 #endif
 
 #include "json-lib.h"
@@ -124,3 +127,9 @@  test_main (void)
 }
 
 #include <support/test-driver.c>
+
+#define libc_hidden_builtin_def(X)
+#undef MEMCPY
+#define MEMCPY generic_memcpy
+#include <string/memcpy.c>
+#include <string/wordcopy.c>
diff --git a/benchtests/bench-memmove-large.c b/benchtests/bench-memmove-large.c
index 9e2fcd50ab..151dd5a276 100644
--- a/benchtests/bench-memmove-large.c
+++ b/benchtests/bench-memmove-large.c
@@ -25,7 +25,10 @@ 
 #include "bench-string.h"
 #include "json-lib.h"
 
+void *generic_memmove (void *, const void *, size_t);
+
 IMPL (memmove, 1)
+IMPL (generic_memmove, 0)
 
 typedef char *(*proto_t) (char *, const char *, size_t);
 
@@ -123,3 +126,9 @@  test_main (void)
 }
 
 #include <support/test-driver.c>
+
+#define libc_hidden_builtin_def(X)
+#undef MEMMOVE
+#define MEMMOVE generic_memmove
+#include <string/memmove.c>
+#include <string/wordcopy.c>