/glibc-2.36/string/ |
D | test-strcat.c | 93 do_test (size_t align1, size_t align2, size_t len1, size_t len2, int max_char) in do_test() argument 102 align2 &= 7; in do_test() 103 if ((align2 + len1 + len2) * sizeof (CHAR) >= page_size) in do_test() 107 s2 = (CHAR *) (buf2) + align2; in do_test() 126 size_t i, j, n, align1, align2, len1, len2; in do_random_tests() local 136 align2 = random () & 31; in do_random_tests() 138 align2 = align1 + (random () & 24); in do_random_tests() 140 if (len1 + align2 > 512) in do_random_tests() 143 len2 = (512 - len1 - align2) * (random () & (1024 * 1024 - 1)) in do_random_tests() 146 if (align2 + len2 > j) in do_random_tests() [all …]
|
D | test-strncpy.c | 111 do_test (size_t align1, size_t align2, size_t len, size_t n, int max_char) in do_test() argument 122 align2 &= 7; in do_test() 123 if ((align2 + len) * sizeof (CHAR) >= page_size) in do_test() 127 s2 = (CHAR *) (buf2) + align2; in do_test() 177 size_t i, j, n, align1, align2, len, size, mode; in do_random_tests() local 194 align2 = align1 - (random () & 24); in do_random_tests() 196 align2 = align1 - (random () & 31); in do_random_tests() 200 align1 = align2; in do_random_tests() 201 align2 = j; in do_random_tests() 214 align2 = random () & 31; in do_random_tests() [all …]
|
D | test-memccpy.c | 63 do_test (size_t align1, size_t align2, int c, size_t len, size_t n, in do_test() argument 73 align2 &= 7; in do_test() 74 if (align2 + len >= page_size) in do_test() 78 s2 = (char *) (buf2 + align2); in do_test() 97 size_t i, j, n, align1, align2, len, size, mode; in do_random_tests() local 111 align2 = align1 - (random () & 24); in do_random_tests() 113 align2 = align1 - (random () & 31); in do_random_tests() 117 align1 = align2; in do_random_tests() 118 align2 = j; in do_random_tests() 131 align2 = random () & 31; in do_random_tests() [all …]
|
D | test-memmove.c | 98 do_test (size_t align1, size_t align2, size_t len) in do_test() argument 107 align2 &= (getpagesize() - 1); in do_test() 108 if (align2 + len >= page_size) in do_test() 112 s2 = (char *) (buf2 + align2); in do_test() 124 size_t i, n, align1, align2, len, size; in do_random_tests() local 144 align2 = size - len - (random () & 31); in do_random_tests() 147 if (align2 > size) in do_random_tests() 148 align2 = 0; in do_random_tests() 153 align2 = random () & (size / 2 - 1); in do_random_tests() 157 if (align2 + len > size) in do_random_tests() [all …]
|
D | test-strncat.c | 99 do_test (size_t align1, size_t align2, size_t len1, size_t len2, in do_test() argument 110 align2 &= 7; in do_test() 111 if ((align2 + len1 + len2) * sizeof (CHAR) >= page_size) in do_test() 113 if ((align2 + len1 + n) * sizeof (CHAR) > page_size) in do_test() 116 s2 = (CHAR *) (buf2) + align2; in do_test() 195 size_t i, j, n, align1, align2, len1, len2, N; in do_random_tests() local 207 align2 = random () & 31; in do_random_tests() 209 align2 = align1 + (random () & 24); in do_random_tests() 211 if (len1 + align2 > 512) in do_random_tests() 214 len2 = (512 - len1 - align2) * (random () & (1024 * 1024 - 1)) in do_random_tests() [all …]
|
D | test-memcpy.c | 25 size_t i, j, n, align1, align2, len, size1, size2, size; in do_random_tests() local 39 align2 = 512; in do_random_tests() 62 align2 = size2 - len - (random () & 31); in do_random_tests() 65 if (align2 > size2) in do_random_tests() 66 align2 = 0; in do_random_tests() 71 align2 = random () & 63; in do_random_tests() 75 if (align2 + len > size2) in do_random_tests() 76 align2 = size2 - len; in do_random_tests() 90 j = align2 + len + 256; in do_random_tests() 94 res = (unsigned char *)CALL (impl, (char *)(p2 + align2), in do_random_tests() [all …]
|
D | test-strcpy.c | 94 do_test (size_t align1, size_t align2, size_t len, int max_char) in do_test() argument 105 align2 &= 7; in do_test() 106 if ((align2 + len) * sizeof (CHAR) >= page_size) in do_test() 110 s2 = (CHAR *) (buf2) + align2; in do_test() 123 size_t i, j, n, align1, align2, len; in do_random_tests() local 138 align2 = random () & (63 / sizeof (CHAR)); in do_random_tests() 140 align2 = align1 + (random () & 24); in do_random_tests() 143 if (align2 > j) in do_random_tests() 144 j = align2; in do_random_tests() 165 res = (UCHAR *) CALL (impl, (CHAR *) (p2 + align2), (CHAR *) (p1 + align1)); in do_random_tests() [all …]
|
D | test-strcasecmp.c | 62 do_test (size_t align1, size_t align2, size_t len, int max_char, in do_test() argument 76 align2 &= getpagesize () - 1; in do_test() 77 if (align2 + (len + 1) >= page_size) in do_test() 81 s2 = (char *) (buf2 + align2); in do_test() 126 size_t i, j, n, align1, align2, pos, len1, len2; in do_random_tests() local 136 align2 = random () & 31; in do_random_tests() 138 align2 = align1 + (random () & 24); in do_random_tests() 140 j = align1 > align2 ? align1 : align2; in do_random_tests() 168 if (i < len2 + align2 && !p2[i]) in do_random_tests() 177 memcpy (p2 + align2, p1 + align1, pos); in do_random_tests() [all …]
|
D | test-memcpy-support.h | 77 do_test (size_t align1, size_t align2, size_t len) in do_test() argument 86 align2 &= 4095; in do_test() 87 if (align2 + len >= page_size) in do_test() 91 s2 = (char *)(buf2 + align2); in do_test() 101 s2 = (char *) (buf1 + align2); in do_test() 106 do_test1 (size_t align1, size_t align2, size_t size) in do_test1() argument 115 align2 &= (page_size - 1); in do_test1() 116 if (align2 == 0) in do_test1() 117 align2 = page_size; in do_test1() 134 unaligned_uint32_t *src = large_buf + region_size + 2 * page_size + align2; in do_test1() [all …]
|
D | test-strcmp.c | 133 do_test (size_t align1, size_t align2, size_t len, int max_char, in do_test() argument 144 align2 &= ~(CHARBYTES - 1); in do_test() 150 align2 &= getpagesize () - 1; in do_test() 151 if (align2 + (len + 1) * CHARBYTES >= page_size) in do_test() 157 i = align2 + CHARBYTES * (len + 2); in do_test() 158 s2 = (CHAR *)(buf2 + ((page_size - i) / 16 * 16) + align2); in do_test() 187 size_t align2; in do_random_tests() local 189 align2 = random () & 31; in do_random_tests() 191 align2 = align1 + (random () & 24); in do_random_tests() 193 size_t j = align1 > align2 ? align1 : align2; in do_random_tests() [all …]
|
D | test-memcmp.c | 115 do_test (size_t align1, size_t align2, size_t len, int exp_result) in do_test() argument 127 align2 &= (4096 - CHARBYTES); in do_test() 128 if (align2 + (len + 1) * CHARBYTES >= page_size) in do_test() 132 s2 = (CHAR *) (buf2 + align2); in do_test() 138 s2[len] = align2; in do_test() 148 size_t i, j, n, align1, align2, pos, len; in do_random_tests() local 158 align2 = random () & 31; in do_random_tests() 160 align2 = align1 + (random () & 24); in do_random_tests() 163 if (align2 > j) in do_random_tests() 164 j = align2; in do_random_tests() [all …]
|
D | test-strncasecmp.c | 82 do_test (size_t align1, size_t align2, size_t n, size_t len, int max_char, in do_test() argument 95 align2 &= getpagesize () - 1; in do_test() 96 if (align2 + (len + 2) >= page_size) in do_test() 101 s2 = (char *) (buf2 + align2); in do_test() 188 size_t i, j, n, align1, align2, pos, len1, len2; in do_random_tests() local 198 align2 = random () & 31; in do_random_tests() 200 align2 = align1 + (random () & 24); in do_random_tests() 202 j = align1 > align2 ? align1 : align2; in do_random_tests() 230 if (i < len2 + align2 && !p2[i]) in do_random_tests() 239 memcpy (p2 + align2, p1 + align1, pos); in do_random_tests() [all …]
|
D | test-strncmp.c | 121 do_test_limit (size_t align1, size_t align2, size_t len, size_t n, int max_char, in do_test_limit() argument 128 align2 &= ~(CHARBYTES - 1); in do_test_limit() 142 align2 &= 15; in do_test_limit() 151 if (align2 < align_n) in do_test_limit() 152 s2 = (CHAR *) ((char *) s2 - (align_n - align2)); in do_test_limit() 172 do_test_n (size_t align1, size_t align2, size_t len, size_t n, int n_in_bounds, in do_test_n() argument 179 align2 &= ~(CHARBYTES - 1); in do_test_n() 190 align2 &= getpagesize () - 1; in do_test_n() 191 if (align2 + (buf_bound + 2) * CHARBYTES >= page_size) in do_test_n() 195 s2 = (CHAR *)(buf2 + align2); in do_test_n() [all …]
|
D | test-memcpy-large.c | 25 size_t i, align1, align2, size; in do_random_large_tests() local 29 align2 = random (); in do_random_large_tests() 31 do_test1 (align1, align2, size); in do_random_large_tests() 37 align2 = random (); in do_random_large_tests() 39 do_test1 (align1, align2, size); in do_random_large_tests()
|
/glibc-2.36/debug/ |
D | test-strcpy_chk.c | 120 do_test (size_t align1, size_t align2, size_t len, size_t dlen, int max_char) in do_test() argument 129 align2 &= 7; in do_test() 130 if (align2 + len >= page_size) in do_test() 134 s2 = (char *) buf2 + align2; in do_test() 147 size_t i, j, n, align1, align2, len, dlen; in do_random_tests() local 156 align2 = random () & 31; in do_random_tests() 158 align2 = align1 + (random () & 24); in do_random_tests() 161 if (align2 > j) in do_random_tests() 162 j = align2; in do_random_tests() 220 CALL (impl, (char *) p2 + align2, in do_random_tests() [all …]
|
/glibc-2.36/benchtests/ |
D | bench-strcmp.c | 102 do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len, in do_test() argument 113 align2 &= ~(CHARBYTES - 1); in do_test() 119 align2 &= (getpagesize () - 1); in do_test() 120 if (align2 + (len + 1) * CHARBYTES >= page_size) in do_test() 128 i = align2 + CHARBYTES * (len + 2); in do_test() 129 align2 = ((page_size - i) / 16 * 16) + align2; in do_test() 133 s2 = (CHAR *)(buf2 + align2); in do_test() 146 json_attr_uint (json_ctx, "align2", (double)align2); in do_test() 158 size_t align1, size_t align2, size_t len, in do_one_test_page_boundary() argument 164 json_attr_uint (json_ctx, "align2", (double) align2); in do_one_test_page_boundary() [all …]
|
D | bench-strncmp.c | 94 do_test_limit (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len, in do_test_limit() argument 101 align2 &= 15; in do_test_limit() 108 json_attr_uint (json_ctx, "align2", (double) align2); in do_test_limit() 120 if (align2 < align_n) in do_test_limit() 121 s2 = (CHAR *) ((char *) s2 - (align_n - align2)); in do_test_limit() 144 do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len, size_t in do_test() argument 157 align2 &= getpagesize () - 1; in do_test() 158 if (align2 + (n + 1) * CHARBYTES >= page_size) in do_test() 165 json_attr_uint (json_ctx, "align2", (double)align2); in do_test() 172 s2 = (CHAR *)(buf2 + align2); in do_test() [all …]
|
D | bench-memcpy-large.c | 55 do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len, in do_test() argument 65 align2 &= 4095; in do_test() 66 if (align2 + len >= page_size) in do_test() 70 s2 = (char *) (buf2 + align2); in do_test() 80 json_attr_uint (json_ctx, "align2", (double) align2); in do_test() 91 s2 = (char *) (buf1 + align2); in do_test()
|
D | bench-memmove-large.c | 52 do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len) in do_test() argument 61 align2 &= 127; in do_test() 62 if (align2 + len >= page_size) in do_test() 66 s2 = (char *) (buf2 + align2); in do_test() 74 json_attr_uint (json_ctx, "align2", (double) align2); in do_test()
|
D | bench-strncat.c | 95 do_test (size_t align1, size_t align2, size_t len1, size_t len2, in do_test() argument 106 align2 &= 7; in do_test() 107 if ((align2 + len1 + len2) * sizeof (CHAR) >= page_size) in do_test() 109 if ((align2 + len1 + n) * sizeof (CHAR) > page_size) in do_test() 112 s2 = (CHAR *) (buf2) + align2; in do_test() 122 len1, len2, align1, align2, n); in do_test()
|
D | bench-memccpy.c | 60 do_test (size_t align1, size_t align2, int c, size_t len, size_t n, in do_test() argument 70 align2 &= 7; in do_test() 71 if (align2 + len >= page_size) in do_test() 75 s2 = (char *) (buf2 + align2); in do_test() 87 printf ("Length %4zd, n %4zd, char %d, alignment %2zd/%2zd:", len, n, c, align1, align2); in do_test()
|
D | bench-memcmp.c | 84 do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len, in do_test() argument 97 align2 &= (4096 - CHARBYTES); in do_test() 98 if (align2 + (len + 1) * CHARBYTES >= page_size) in do_test() 104 json_attr_uint (json_ctx, "align2", (double) align2); in do_test() 109 s2 = (CHAR *)(buf2 + align2); in do_test() 115 s2[len] = align2; in do_test()
|
D | bench-strcat.c | 87 do_test (size_t align1, size_t align2, size_t len1, size_t len2, int max_char) in do_test() argument 96 align2 &= 7; in do_test() 97 if ((align2 + len1 + len2) * sizeof (CHAR) >= page_size) in do_test() 101 s2 = (CHAR *) (buf2) + align2; in do_test() 110 printf ("Length %4zd/%4zd, alignment %2zd/%2zd:", len1, len2, align1, align2); in do_test()
|
D | bench-strcpy.c | 90 do_test (size_t align1, size_t align2, size_t len, int max_char) in do_test() argument 101 align2 &= 7; in do_test() 102 if ((align2 + len) * sizeof (CHAR) >= page_size) in do_test() 106 s2 = (CHAR *) (buf2) + align2; in do_test() 113 align1 * sizeof (CHAR), align2 * sizeof (CHAR)); in do_test()
|
D | bench-strncpy.c | 101 do_test (size_t align1, size_t align2, size_t len, size_t n, int max_char) in do_test() argument 112 align2 &= 7; in do_test() 113 if ((align2 + len) * sizeof (CHAR) >= page_size) in do_test() 117 s2 = (CHAR *) (buf2) + align2; in do_test() 126 printf ("Length %4zd, n %4zd, alignment %2zd/%2zd:", len, n, align1, align2); in do_test()
|