| 1 | /* Enumerate available IFUNC implementations of a function. x86-64 version. |
| 2 | Copyright (C) 2012-2017 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. |
| 4 | |
| 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either |
| 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | |
| 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | Lesser General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see |
| 17 | <http://www.gnu.org/licenses/>. */ |
| 18 | |
| 19 | #include <assert.h> |
| 20 | #include <string.h> |
| 21 | #include <wchar.h> |
| 22 | #include <ifunc-impl-list.h> |
| 23 | #include <sysdep.h> |
| 24 | #include "init-arch.h" |
| 25 | |
| 26 | /* Maximum number of IFUNC implementations. */ |
| 27 | #define MAX_IFUNC 5 |
| 28 | |
| 29 | /* Fill ARRAY of MAX elements with IFUNC implementations for function |
| 30 | NAME supported on target machine and return the number of valid |
| 31 | entries. */ |
| 32 | |
| 33 | size_t |
| 34 | __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, |
| 35 | size_t max) |
| 36 | { |
| 37 | assert (max >= MAX_IFUNC); |
| 38 | |
| 39 | size_t i = 0; |
| 40 | |
| 41 | /* Support sysdeps/x86_64/multiarch/memcmp.S. */ |
| 42 | IFUNC_IMPL (i, name, memcmp, |
| 43 | IFUNC_IMPL_ADD (array, i, memcmp, HAS_CPU_FEATURE (SSE4_1), |
| 44 | __memcmp_sse4_1) |
| 45 | IFUNC_IMPL_ADD (array, i, memcmp, HAS_CPU_FEATURE (SSSE3), |
| 46 | __memcmp_ssse3) |
| 47 | IFUNC_IMPL_ADD (array, i, memcmp, 1, __memcmp_sse2)) |
| 48 | |
| 49 | /* Support sysdeps/x86_64/multiarch/memmove_chk.c. */ |
| 50 | IFUNC_IMPL (i, name, __memmove_chk, |
| 51 | IFUNC_IMPL_ADD (array, i, __memmove_chk, |
| 52 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 53 | __memmove_chk_avx512_no_vzeroupper) |
| 54 | IFUNC_IMPL_ADD (array, i, __memmove_chk, |
| 55 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 56 | __memmove_chk_avx512_unaligned) |
| 57 | IFUNC_IMPL_ADD (array, i, __memmove_chk, |
| 58 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 59 | __memmove_chk_avx512_unaligned_erms) |
| 60 | IFUNC_IMPL_ADD (array, i, __memmove_chk, |
| 61 | HAS_ARCH_FEATURE (AVX_Usable), |
| 62 | __memmove_chk_avx_unaligned) |
| 63 | IFUNC_IMPL_ADD (array, i, __memmove_chk, |
| 64 | HAS_ARCH_FEATURE (AVX_Usable), |
| 65 | __memmove_chk_avx_unaligned_erms) |
| 66 | IFUNC_IMPL_ADD (array, i, __memmove_chk, |
| 67 | HAS_CPU_FEATURE (SSSE3), |
| 68 | __memmove_chk_ssse3_back) |
| 69 | IFUNC_IMPL_ADD (array, i, __memmove_chk, |
| 70 | HAS_CPU_FEATURE (SSSE3), |
| 71 | __memmove_chk_ssse3) |
| 72 | IFUNC_IMPL_ADD (array, i, __memmove_chk, 1, |
| 73 | __memmove_chk_sse2_unaligned) |
| 74 | IFUNC_IMPL_ADD (array, i, __memmove_chk, 1, |
| 75 | __memmove_chk_sse2_unaligned_erms)) |
| 76 | |
| 77 | /* Support sysdeps/x86_64/multiarch/memmove.S. */ |
| 78 | IFUNC_IMPL (i, name, memmove, |
| 79 | IFUNC_IMPL_ADD (array, i, memmove, |
| 80 | HAS_ARCH_FEATURE (AVX_Usable), |
| 81 | __memmove_avx_unaligned) |
| 82 | IFUNC_IMPL_ADD (array, i, memmove, |
| 83 | HAS_ARCH_FEATURE (AVX_Usable), |
| 84 | __memmove_avx_unaligned_erms) |
| 85 | IFUNC_IMPL_ADD (array, i, memmove, |
| 86 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 87 | __memmove_avx512_no_vzeroupper) |
| 88 | IFUNC_IMPL_ADD (array, i, memmove, |
| 89 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 90 | __memmove_avx512_unaligned) |
| 91 | IFUNC_IMPL_ADD (array, i, memmove, |
| 92 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 93 | __memmove_avx512_unaligned_erms) |
| 94 | IFUNC_IMPL_ADD (array, i, memmove, HAS_CPU_FEATURE (SSSE3), |
| 95 | __memmove_ssse3_back) |
| 96 | IFUNC_IMPL_ADD (array, i, memmove, HAS_CPU_FEATURE (SSSE3), |
| 97 | __memmove_ssse3) |
| 98 | IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_erms) |
| 99 | IFUNC_IMPL_ADD (array, i, memmove, 1, |
| 100 | __memmove_sse2_unaligned) |
| 101 | IFUNC_IMPL_ADD (array, i, memmove, 1, |
| 102 | __memmove_sse2_unaligned_erms)) |
| 103 | |
| 104 | /* Support sysdeps/x86_64/multiarch/memset_chk.S. */ |
| 105 | IFUNC_IMPL (i, name, __memset_chk, |
| 106 | IFUNC_IMPL_ADD (array, i, __memset_chk, 1, |
| 107 | __memset_chk_sse2_unaligned) |
| 108 | IFUNC_IMPL_ADD (array, i, __memset_chk, 1, |
| 109 | __memset_chk_sse2_unaligned_erms) |
| 110 | IFUNC_IMPL_ADD (array, i, __memset_chk, |
| 111 | HAS_ARCH_FEATURE (AVX2_Usable), |
| 112 | __memset_chk_avx2_unaligned) |
| 113 | IFUNC_IMPL_ADD (array, i, __memset_chk, |
| 114 | HAS_ARCH_FEATURE (AVX2_Usable), |
| 115 | __memset_chk_avx2_unaligned_erms) |
| 116 | IFUNC_IMPL_ADD (array, i, __memset_chk, |
| 117 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 118 | __memset_chk_avx512_unaligned_erms) |
| 119 | IFUNC_IMPL_ADD (array, i, __memset_chk, |
| 120 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 121 | __memset_chk_avx512_unaligned) |
| 122 | IFUNC_IMPL_ADD (array, i, __memset_chk, |
| 123 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 124 | __memset_chk_avx512_no_vzeroupper) |
| 125 | ) |
| 126 | |
| 127 | /* Support sysdeps/x86_64/multiarch/memset.S. */ |
| 128 | IFUNC_IMPL (i, name, memset, |
| 129 | IFUNC_IMPL_ADD (array, i, memset, 1, |
| 130 | __memset_sse2_unaligned) |
| 131 | IFUNC_IMPL_ADD (array, i, memset, 1, |
| 132 | __memset_sse2_unaligned_erms) |
| 133 | IFUNC_IMPL_ADD (array, i, memset, 1, __memset_erms) |
| 134 | IFUNC_IMPL_ADD (array, i, memset, |
| 135 | HAS_ARCH_FEATURE (AVX2_Usable), |
| 136 | __memset_avx2_unaligned) |
| 137 | IFUNC_IMPL_ADD (array, i, memset, |
| 138 | HAS_ARCH_FEATURE (AVX2_Usable), |
| 139 | __memset_avx2_unaligned_erms) |
| 140 | IFUNC_IMPL_ADD (array, i, memset, |
| 141 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 142 | __memset_avx512_unaligned_erms) |
| 143 | IFUNC_IMPL_ADD (array, i, memset, |
| 144 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 145 | __memset_avx512_unaligned) |
| 146 | IFUNC_IMPL_ADD (array, i, memset, |
| 147 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 148 | __memset_avx512_no_vzeroupper) |
| 149 | ) |
| 150 | |
| 151 | /* Support sysdeps/x86_64/multiarch/stpncpy.S. */ |
| 152 | IFUNC_IMPL (i, name, stpncpy, |
| 153 | IFUNC_IMPL_ADD (array, i, stpncpy, HAS_CPU_FEATURE (SSSE3), |
| 154 | __stpncpy_ssse3) |
| 155 | IFUNC_IMPL_ADD (array, i, stpncpy, 1, |
| 156 | __stpncpy_sse2_unaligned) |
| 157 | IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_sse2)) |
| 158 | |
| 159 | /* Support sysdeps/x86_64/multiarch/stpcpy.S. */ |
| 160 | IFUNC_IMPL (i, name, stpcpy, |
| 161 | IFUNC_IMPL_ADD (array, i, stpcpy, HAS_CPU_FEATURE (SSSE3), |
| 162 | __stpcpy_ssse3) |
| 163 | IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_sse2_unaligned) |
| 164 | IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_sse2)) |
| 165 | |
| 166 | /* Support sysdeps/x86_64/multiarch/strcasecmp_l.S. */ |
| 167 | IFUNC_IMPL (i, name, strcasecmp, |
| 168 | IFUNC_IMPL_ADD (array, i, strcasecmp, |
| 169 | HAS_ARCH_FEATURE (AVX_Usable), |
| 170 | __strcasecmp_avx) |
| 171 | IFUNC_IMPL_ADD (array, i, strcasecmp, |
| 172 | HAS_CPU_FEATURE (SSE4_2), |
| 173 | __strcasecmp_sse42) |
| 174 | IFUNC_IMPL_ADD (array, i, strcasecmp, |
| 175 | HAS_CPU_FEATURE (SSSE3), |
| 176 | __strcasecmp_ssse3) |
| 177 | IFUNC_IMPL_ADD (array, i, strcasecmp, 1, __strcasecmp_sse2)) |
| 178 | |
| 179 | /* Support sysdeps/x86_64/multiarch/strcasecmp_l.S. */ |
| 180 | IFUNC_IMPL (i, name, strcasecmp_l, |
| 181 | IFUNC_IMPL_ADD (array, i, strcasecmp_l, |
| 182 | HAS_ARCH_FEATURE (AVX_Usable), |
| 183 | __strcasecmp_l_avx) |
| 184 | IFUNC_IMPL_ADD (array, i, strcasecmp_l, |
| 185 | HAS_CPU_FEATURE (SSE4_2), |
| 186 | __strcasecmp_l_sse42) |
| 187 | IFUNC_IMPL_ADD (array, i, strcasecmp_l, |
| 188 | HAS_CPU_FEATURE (SSSE3), |
| 189 | __strcasecmp_l_ssse3) |
| 190 | IFUNC_IMPL_ADD (array, i, strcasecmp_l, 1, |
| 191 | __strcasecmp_l_sse2)) |
| 192 | |
| 193 | /* Support sysdeps/x86_64/multiarch/strcat.S. */ |
| 194 | IFUNC_IMPL (i, name, strcat, |
| 195 | IFUNC_IMPL_ADD (array, i, strcat, HAS_CPU_FEATURE (SSSE3), |
| 196 | __strcat_ssse3) |
| 197 | IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_sse2_unaligned) |
| 198 | IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_sse2)) |
| 199 | |
| 200 | /* Support sysdeps/x86_64/multiarch/strchr.S. */ |
| 201 | IFUNC_IMPL (i, name, strchr, |
| 202 | IFUNC_IMPL_ADD (array, i, strchr, 1, __strchr_sse2_no_bsf) |
| 203 | IFUNC_IMPL_ADD (array, i, strchr, 1, __strchr_sse2)) |
| 204 | |
| 205 | /* Support sysdeps/x86_64/multiarch/strcmp.S. */ |
| 206 | IFUNC_IMPL (i, name, strcmp, |
| 207 | IFUNC_IMPL_ADD (array, i, strcmp, HAS_CPU_FEATURE (SSE4_2), |
| 208 | __strcmp_sse42) |
| 209 | IFUNC_IMPL_ADD (array, i, strcmp, HAS_CPU_FEATURE (SSSE3), |
| 210 | __strcmp_ssse3) |
| 211 | IFUNC_IMPL_ADD (array, i, strcmp, 1, __strcmp_sse2_unaligned) |
| 212 | IFUNC_IMPL_ADD (array, i, strcmp, 1, __strcmp_sse2)) |
| 213 | |
| 214 | /* Support sysdeps/x86_64/multiarch/strcpy.S. */ |
| 215 | IFUNC_IMPL (i, name, strcpy, |
| 216 | IFUNC_IMPL_ADD (array, i, strcpy, HAS_CPU_FEATURE (SSSE3), |
| 217 | __strcpy_ssse3) |
| 218 | IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_sse2_unaligned) |
| 219 | IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_sse2)) |
| 220 | |
| 221 | /* Support sysdeps/x86_64/multiarch/strcspn.S. */ |
| 222 | IFUNC_IMPL (i, name, strcspn, |
| 223 | IFUNC_IMPL_ADD (array, i, strcspn, HAS_CPU_FEATURE (SSE4_2), |
| 224 | __strcspn_sse42) |
| 225 | IFUNC_IMPL_ADD (array, i, strcspn, 1, __strcspn_sse2)) |
| 226 | |
| 227 | /* Support sysdeps/x86_64/multiarch/strncase_l.S. */ |
| 228 | IFUNC_IMPL (i, name, strncasecmp, |
| 229 | IFUNC_IMPL_ADD (array, i, strncasecmp, |
| 230 | HAS_ARCH_FEATURE (AVX_Usable), |
| 231 | __strncasecmp_avx) |
| 232 | IFUNC_IMPL_ADD (array, i, strncasecmp, |
| 233 | HAS_CPU_FEATURE (SSE4_2), |
| 234 | __strncasecmp_sse42) |
| 235 | IFUNC_IMPL_ADD (array, i, strncasecmp, |
| 236 | HAS_CPU_FEATURE (SSSE3), |
| 237 | __strncasecmp_ssse3) |
| 238 | IFUNC_IMPL_ADD (array, i, strncasecmp, 1, |
| 239 | __strncasecmp_sse2)) |
| 240 | |
| 241 | /* Support sysdeps/x86_64/multiarch/strncase_l.S. */ |
| 242 | IFUNC_IMPL (i, name, strncasecmp_l, |
| 243 | IFUNC_IMPL_ADD (array, i, strncasecmp_l, |
| 244 | HAS_ARCH_FEATURE (AVX_Usable), |
| 245 | __strncasecmp_l_avx) |
| 246 | IFUNC_IMPL_ADD (array, i, strncasecmp_l, |
| 247 | HAS_CPU_FEATURE (SSE4_2), |
| 248 | __strncasecmp_l_sse42) |
| 249 | IFUNC_IMPL_ADD (array, i, strncasecmp_l, |
| 250 | HAS_CPU_FEATURE (SSSE3), |
| 251 | __strncasecmp_l_ssse3) |
| 252 | IFUNC_IMPL_ADD (array, i, strncasecmp_l, 1, |
| 253 | __strncasecmp_l_sse2)) |
| 254 | |
| 255 | /* Support sysdeps/x86_64/multiarch/strncat.S. */ |
| 256 | IFUNC_IMPL (i, name, strncat, |
| 257 | IFUNC_IMPL_ADD (array, i, strncat, HAS_CPU_FEATURE (SSSE3), |
| 258 | __strncat_ssse3) |
| 259 | IFUNC_IMPL_ADD (array, i, strncat, 1, |
| 260 | __strncat_sse2_unaligned) |
| 261 | IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_sse2)) |
| 262 | |
| 263 | /* Support sysdeps/x86_64/multiarch/strncpy.S. */ |
| 264 | IFUNC_IMPL (i, name, strncpy, |
| 265 | IFUNC_IMPL_ADD (array, i, strncpy, HAS_CPU_FEATURE (SSSE3), |
| 266 | __strncpy_ssse3) |
| 267 | IFUNC_IMPL_ADD (array, i, strncpy, 1, |
| 268 | __strncpy_sse2_unaligned) |
| 269 | IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_sse2)) |
| 270 | |
| 271 | /* Support sysdeps/x86_64/multiarch/strpbrk.S. */ |
| 272 | IFUNC_IMPL (i, name, strpbrk, |
| 273 | IFUNC_IMPL_ADD (array, i, strpbrk, HAS_CPU_FEATURE (SSE4_2), |
| 274 | __strpbrk_sse42) |
| 275 | IFUNC_IMPL_ADD (array, i, strpbrk, 1, __strpbrk_sse2)) |
| 276 | |
| 277 | |
| 278 | /* Support sysdeps/x86_64/multiarch/strspn.S. */ |
| 279 | IFUNC_IMPL (i, name, strspn, |
| 280 | IFUNC_IMPL_ADD (array, i, strspn, HAS_CPU_FEATURE (SSE4_2), |
| 281 | __strspn_sse42) |
| 282 | IFUNC_IMPL_ADD (array, i, strspn, 1, __strspn_sse2)) |
| 283 | |
| 284 | /* Support sysdeps/x86_64/multiarch/strstr.c. */ |
| 285 | IFUNC_IMPL (i, name, strstr, |
| 286 | IFUNC_IMPL_ADD (array, i, strstr, 1, __strstr_sse2_unaligned) |
| 287 | IFUNC_IMPL_ADD (array, i, strstr, 1, __strstr_sse2)) |
| 288 | |
| 289 | /* Support sysdeps/x86_64/multiarch/wcscpy.S. */ |
| 290 | IFUNC_IMPL (i, name, wcscpy, |
| 291 | IFUNC_IMPL_ADD (array, i, wcscpy, HAS_CPU_FEATURE (SSSE3), |
| 292 | __wcscpy_ssse3) |
| 293 | IFUNC_IMPL_ADD (array, i, wcscpy, 1, __wcscpy_sse2)) |
| 294 | |
| 295 | /* Support sysdeps/x86_64/multiarch/wmemcmp.S. */ |
| 296 | IFUNC_IMPL (i, name, wmemcmp, |
| 297 | IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_CPU_FEATURE (SSE4_1), |
| 298 | __wmemcmp_sse4_1) |
| 299 | IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_CPU_FEATURE (SSSE3), |
| 300 | __wmemcmp_ssse3) |
| 301 | IFUNC_IMPL_ADD (array, i, wmemcmp, 1, __wmemcmp_sse2)) |
| 302 | |
| 303 | #ifdef SHARED |
| 304 | /* Support sysdeps/x86_64/multiarch/memcpy_chk.S. */ |
| 305 | IFUNC_IMPL (i, name, __memcpy_chk, |
| 306 | IFUNC_IMPL_ADD (array, i, __memcpy_chk, |
| 307 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 308 | __memcpy_chk_avx512_no_vzeroupper) |
| 309 | IFUNC_IMPL_ADD (array, i, __memcpy_chk, |
| 310 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 311 | __memcpy_chk_avx512_unaligned) |
| 312 | IFUNC_IMPL_ADD (array, i, __memcpy_chk, |
| 313 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 314 | __memcpy_chk_avx512_unaligned_erms) |
| 315 | IFUNC_IMPL_ADD (array, i, __memcpy_chk, |
| 316 | HAS_ARCH_FEATURE (AVX_Usable), |
| 317 | __memcpy_chk_avx_unaligned) |
| 318 | IFUNC_IMPL_ADD (array, i, __memcpy_chk, |
| 319 | HAS_ARCH_FEATURE (AVX_Usable), |
| 320 | __memcpy_chk_avx_unaligned_erms) |
| 321 | IFUNC_IMPL_ADD (array, i, __memcpy_chk, |
| 322 | HAS_CPU_FEATURE (SSSE3), |
| 323 | __memcpy_chk_ssse3_back) |
| 324 | IFUNC_IMPL_ADD (array, i, __memcpy_chk, |
| 325 | HAS_CPU_FEATURE (SSSE3), |
| 326 | __memcpy_chk_ssse3) |
| 327 | IFUNC_IMPL_ADD (array, i, __memcpy_chk, 1, |
| 328 | __memcpy_chk_sse2_unaligned) |
| 329 | IFUNC_IMPL_ADD (array, i, __memcpy_chk, 1, |
| 330 | __memcpy_chk_sse2_unaligned_erms)) |
| 331 | |
| 332 | /* Support sysdeps/x86_64/multiarch/memcpy.S. */ |
| 333 | IFUNC_IMPL (i, name, memcpy, |
| 334 | IFUNC_IMPL_ADD (array, i, memcpy, |
| 335 | HAS_ARCH_FEATURE (AVX_Usable), |
| 336 | __memcpy_avx_unaligned) |
| 337 | IFUNC_IMPL_ADD (array, i, memcpy, |
| 338 | HAS_ARCH_FEATURE (AVX_Usable), |
| 339 | __memcpy_avx_unaligned_erms) |
| 340 | IFUNC_IMPL_ADD (array, i, memcpy, HAS_CPU_FEATURE (SSSE3), |
| 341 | __memcpy_ssse3_back) |
| 342 | IFUNC_IMPL_ADD (array, i, memcpy, HAS_CPU_FEATURE (SSSE3), |
| 343 | __memcpy_ssse3) |
| 344 | IFUNC_IMPL_ADD (array, i, memcpy, |
| 345 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 346 | __memcpy_avx512_no_vzeroupper) |
| 347 | IFUNC_IMPL_ADD (array, i, memcpy, |
| 348 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 349 | __memcpy_avx512_unaligned) |
| 350 | IFUNC_IMPL_ADD (array, i, memcpy, |
| 351 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 352 | __memcpy_avx512_unaligned_erms) |
| 353 | IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_sse2_unaligned) |
| 354 | IFUNC_IMPL_ADD (array, i, memcpy, 1, |
| 355 | __memcpy_sse2_unaligned_erms) |
| 356 | IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_erms)) |
| 357 | |
| 358 | /* Support sysdeps/x86_64/multiarch/mempcpy_chk.S. */ |
| 359 | IFUNC_IMPL (i, name, __mempcpy_chk, |
| 360 | IFUNC_IMPL_ADD (array, i, __mempcpy_chk, |
| 361 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 362 | __mempcpy_chk_avx512_no_vzeroupper) |
| 363 | IFUNC_IMPL_ADD (array, i, __mempcpy_chk, |
| 364 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 365 | __mempcpy_chk_avx512_unaligned) |
| 366 | IFUNC_IMPL_ADD (array, i, __mempcpy_chk, |
| 367 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 368 | __mempcpy_chk_avx512_unaligned_erms) |
| 369 | IFUNC_IMPL_ADD (array, i, __mempcpy_chk, |
| 370 | HAS_ARCH_FEATURE (AVX_Usable), |
| 371 | __mempcpy_chk_avx_unaligned) |
| 372 | IFUNC_IMPL_ADD (array, i, __mempcpy_chk, |
| 373 | HAS_ARCH_FEATURE (AVX_Usable), |
| 374 | __mempcpy_chk_avx_unaligned_erms) |
| 375 | IFUNC_IMPL_ADD (array, i, __mempcpy_chk, |
| 376 | HAS_CPU_FEATURE (SSSE3), |
| 377 | __mempcpy_chk_ssse3_back) |
| 378 | IFUNC_IMPL_ADD (array, i, __mempcpy_chk, |
| 379 | HAS_CPU_FEATURE (SSSE3), |
| 380 | __mempcpy_chk_ssse3) |
| 381 | IFUNC_IMPL_ADD (array, i, __mempcpy_chk, 1, |
| 382 | __mempcpy_chk_sse2_unaligned) |
| 383 | IFUNC_IMPL_ADD (array, i, __mempcpy_chk, 1, |
| 384 | __mempcpy_chk_sse2_unaligned_erms)) |
| 385 | |
| 386 | /* Support sysdeps/x86_64/multiarch/mempcpy.S. */ |
| 387 | IFUNC_IMPL (i, name, mempcpy, |
| 388 | IFUNC_IMPL_ADD (array, i, mempcpy, |
| 389 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 390 | __mempcpy_avx512_no_vzeroupper) |
| 391 | IFUNC_IMPL_ADD (array, i, mempcpy, |
| 392 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 393 | __mempcpy_avx512_unaligned) |
| 394 | IFUNC_IMPL_ADD (array, i, mempcpy, |
| 395 | HAS_ARCH_FEATURE (AVX512F_Usable), |
| 396 | __mempcpy_avx512_unaligned_erms) |
| 397 | IFUNC_IMPL_ADD (array, i, mempcpy, |
| 398 | HAS_ARCH_FEATURE (AVX_Usable), |
| 399 | __mempcpy_avx_unaligned) |
| 400 | IFUNC_IMPL_ADD (array, i, mempcpy, |
| 401 | HAS_ARCH_FEATURE (AVX_Usable), |
| 402 | __mempcpy_avx_unaligned_erms) |
| 403 | IFUNC_IMPL_ADD (array, i, mempcpy, HAS_CPU_FEATURE (SSSE3), |
| 404 | __mempcpy_ssse3_back) |
| 405 | IFUNC_IMPL_ADD (array, i, mempcpy, HAS_CPU_FEATURE (SSSE3), |
| 406 | __mempcpy_ssse3) |
| 407 | IFUNC_IMPL_ADD (array, i, mempcpy, 1, |
| 408 | __mempcpy_sse2_unaligned) |
| 409 | IFUNC_IMPL_ADD (array, i, mempcpy, 1, |
| 410 | __mempcpy_sse2_unaligned_erms) |
| 411 | IFUNC_IMPL_ADD (array, i, mempcpy, 1, __mempcpy_erms)) |
| 412 | |
| 413 | /* Support sysdeps/x86_64/multiarch/strncmp.S. */ |
| 414 | IFUNC_IMPL (i, name, strncmp, |
| 415 | IFUNC_IMPL_ADD (array, i, strncmp, HAS_CPU_FEATURE (SSE4_2), |
| 416 | __strncmp_sse42) |
| 417 | IFUNC_IMPL_ADD (array, i, strncmp, HAS_CPU_FEATURE (SSSE3), |
| 418 | __strncmp_ssse3) |
| 419 | IFUNC_IMPL_ADD (array, i, strncmp, 1, __strncmp_sse2)) |
| 420 | #endif |
| 421 | |
| 422 | return i; |
| 423 | } |
| 424 | |