This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 3/3] Test 64-byte alignment in memset benchtest
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 31 Mar 2016 09:34:35 -0700
- Subject: [PATCH 3/3] Test 64-byte alignment in memset benchtest
- Authentication-results: sourceware.org; auth=none
- References: <1459442075-25158-1-git-send-email-hjl dot tools at gmail dot com>
Add 64-byte alignment tests in memset benchtest for 64-byte vector
registers.
OK for master?
H.J.
--
* benchtests/bench-memset.c (do_test): Support 64-byte
alignment.
(test_main): Test 64-byte alignment.
---
benchtests/bench-memset.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/benchtests/bench-memset.c b/benchtests/bench-memset.c
index 6d3218a..98ec257 100644
--- a/benchtests/bench-memset.c
+++ b/benchtests/bench-memset.c
@@ -134,7 +134,7 @@ do_one_test (impl_t *impl, CHAR *s, int c __attribute ((unused)), size_t n)
static void
do_test (size_t align, int c, size_t len)
{
- align &= 7;
+ align &= 63;
if ((align + len) * sizeof (CHAR) > page_size)
return;
@@ -181,6 +181,11 @@ test_main (void)
do_test (4, c, 64);
do_test (2, c, 25);
}
+ for (i = 33; i <= 256; i += 4)
+ {
+ do_test (0, c, 32 * i);
+ do_test (i, c, 32 * i);
+ }
return ret;
}
--
2.5.5