summary refs log tree commit diff
path: root/benchtests
diff options
context:
space:
mode:
authornoah <goldstein.w.n@gmail.com>2021-04-03 04:12:16 -0400
committerH.J. Lu <hjl.tools@gmail.com>2021-04-16 12:09:56 -0700
commit81cbc3bcaed730aa5d9e5d4ec46a0d4cb9eb6cd5 (patch)
tree097e7929cfdeb45333ae0796a0d3da343e2a45ed /benchtests
parentcd6ae7ea5431c2b8f16201fb0e2c413bf8d2df06 (diff)
downloadglibc-81cbc3bcaed730aa5d9e5d4ec46a0d4cb9eb6cd5.tar.gz
glibc-81cbc3bcaed730aa5d9e5d4ec46a0d4cb9eb6cd5.tar.xz
glibc-81cbc3bcaed730aa5d9e5d4ec46a0d4cb9eb6cd5.zip
x86: Expanding test-memmove.c, test-memcpy.c, bench-memcpy-large.c
No Bug. This commit expanding the range of tests / benchmarks for
memmove and memcpy. The test expansion is mostly in the vein of
increasing the maximum size, increasing the number of unique
alignments tested, and testing both source < destination and vice
versa. The benchmark expansaion is just to increase the number of
unique alignments. test-memcpy, test-memccpy, test-mempcpy,
test-memmove, and tst-memmove-overflow all pass.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Diffstat (limited to 'benchtests')
-rw-r--r--benchtests/bench-memcpy-large.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/benchtests/bench-memcpy-large.c b/benchtests/bench-memcpy-large.c
index 3df1575514..efb9627b1e 100644
--- a/benchtests/bench-memcpy-large.c
+++ b/benchtests/bench-memcpy-large.c
@@ -57,11 +57,11 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
   size_t i, j;
   char *s1, *s2;
 
-  align1 &= 63;
+  align1 &= 4095;
   if (align1 + len >= page_size)
     return;
 
-  align2 &= 63;
+  align2 &= 4095;
   if (align2 + len >= page_size)
     return;
 
@@ -113,6 +113,10 @@ test_main (void)
       do_test (&json_ctx, 0, 3, i + 15);
       do_test (&json_ctx, 3, 0, i + 31);
       do_test (&json_ctx, 3, 5, i + 63);
+      do_test (&json_ctx, 0, 127, i);
+      do_test (&json_ctx, 0, 255, i);
+      do_test (&json_ctx, 0, 256, i);
+      do_test (&json_ctx, 0, 4064, i);
     }
 
   json_array_end (&json_ctx);