|
Packit |
6c4009 |
/* Enumerate available IFUNC implementations of a function. s390/s390x version.
|
|
Packit |
6c4009 |
Copyright (C) 2015-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
<http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <assert.h>
|
|
Packit |
6c4009 |
#include <string.h>
|
|
Packit |
6c4009 |
#include <wchar.h>
|
|
Packit |
6c4009 |
#include <ifunc-impl-list.h>
|
|
Packit |
6c4009 |
#include <ifunc-resolve.h>
|
|
Packit |
637210 |
#include <ifunc-memset.h>
|
|
Packit |
4fb3eb |
#include <ifunc-memcmp.h>
|
|
Packit |
a65cea |
#include <ifunc-memcpy.h>
|
|
Packit |
b82062 |
#include <ifunc-strstr.h>
|
|
Packit |
a5344b |
#include <ifunc-memmem.h>
|
|
Packit |
7b69de |
#include <ifunc-strlen.h>
|
|
Packit |
50c855 |
#include <ifunc-strnlen.h>
|
|
Packit |
442c2a |
#include <ifunc-strcpy.h>
|
|
Packit |
138bad |
#include <ifunc-stpcpy.h>
|
|
Packit |
1e4663 |
#include <ifunc-strncpy.h>
|
|
Packit |
1df751 |
#include <ifunc-stpncpy.h>
|
|
Packit |
78c3d4 |
#include <ifunc-strcat.h>
|
|
Packit |
24e75d |
#include <ifunc-strncat.h>
|
|
Packit |
360467 |
#include <ifunc-strcmp.h>
|
|
Packit |
2d41f9 |
#include <ifunc-strncmp.h>
|
|
Packit |
d4c9c9 |
#include <ifunc-strchr.h>
|
|
Packit |
782a64 |
#include <ifunc-strchrnul.h>
|
|
Packit |
2e49c9 |
#include <ifunc-strrchr.h>
|
|
Packit |
c0fcf4 |
#include <ifunc-strspn.h>
|
|
Packit |
492e9e |
#include <ifunc-strpbrk.h>
|
|
Packit |
2cd3b1 |
#include <ifunc-strcspn.h>
|
|
Packit |
e222d3 |
#include <ifunc-memchr.h>
|
|
Packit |
4a522b |
#include <ifunc-rawmemchr.h>
|
|
Packit |
93954a |
#include <ifunc-memccpy.h>
|
|
Packit |
0dcf6e |
#include <ifunc-memrchr.h>
|
|
Packit |
cdab98 |
#include <ifunc-wcslen.h>
|
|
Packit |
a537e0 |
#include <ifunc-wcsnlen.h>
|
|
Packit |
5f7343 |
#include <ifunc-wcscpy.h>
|
|
Packit |
27bf7e |
#include <ifunc-wcpcpy.h>
|
|
Packit |
fae013 |
#include <ifunc-wcsncpy.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Maximum number of IFUNC implementations. */
|
|
Packit |
6c4009 |
#define MAX_IFUNC 3
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Fill ARRAY of MAX elements with IFUNC implementations for function
|
|
Packit |
6c4009 |
NAME supported on target machine and return the number of valid
|
|
Packit |
6c4009 |
entries. */
|
|
Packit |
6c4009 |
size_t
|
|
Packit |
6c4009 |
__libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
|
Packit |
6c4009 |
size_t max)
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
assert (max >= MAX_IFUNC);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
size_t i = 0;
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Get hardware information. */
|
|
Packit |
6c4009 |
unsigned long int dl_hwcap = GLRO (dl_hwcap);
|
|
Packit |
6c4009 |
unsigned long long stfle_bits = 0ULL;
|
|
Packit |
6c4009 |
if ((dl_hwcap & HWCAP_S390_STFLE)
|
|
Packit |
6c4009 |
&& (dl_hwcap & HWCAP_S390_ZARCH)
|
|
Packit |
6c4009 |
&& (dl_hwcap & HWCAP_S390_HIGH_GPRS))
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
S390_STORE_STFLE (stfle_bits);
|
|
Packit |
6c4009 |
}
|
|
Packit |
6c4009 |
|
|
Packit |
637210 |
#if HAVE_MEMSET_IFUNC
|
|
Packit |
6c4009 |
IFUNC_IMPL (i, name, memset,
|
|
Packit |
637210 |
# if HAVE_MEMSET_Z196
|
|
Packit |
6c4009 |
IFUNC_IMPL_ADD (array, i, memset,
|
|
Packit |
637210 |
S390_IS_Z196 (stfle_bits), MEMSET_Z196)
|
|
Packit |
637210 |
# endif
|
|
Packit |
637210 |
# if HAVE_MEMSET_Z10
|
|
Packit |
6c4009 |
IFUNC_IMPL_ADD (array, i, memset,
|
|
Packit |
637210 |
S390_IS_Z10 (stfle_bits), MEMSET_Z10)
|
|
Packit |
637210 |
# endif
|
|
Packit |
637210 |
# if HAVE_MEMSET_Z900_G5
|
|
Packit |
637210 |
IFUNC_IMPL_ADD (array, i, memset, 1, MEMSET_Z900_G5)
|
|
Packit |
637210 |
# endif
|
|
Packit |
637210 |
)
|
|
Packit |
718e5a |
|
|
Packit |
718e5a |
/* Note: bzero is implemented in memset. */
|
|
Packit |
718e5a |
IFUNC_IMPL (i, name, bzero,
|
|
Packit |
718e5a |
# if HAVE_MEMSET_Z196
|
|
Packit |
718e5a |
IFUNC_IMPL_ADD (array, i, bzero,
|
|
Packit |
718e5a |
S390_IS_Z196 (stfle_bits), BZERO_Z196)
|
|
Packit |
718e5a |
# endif
|
|
Packit |
718e5a |
# if HAVE_MEMSET_Z10
|
|
Packit |
718e5a |
IFUNC_IMPL_ADD (array, i, bzero,
|
|
Packit |
718e5a |
S390_IS_Z10 (stfle_bits), BZERO_Z10)
|
|
Packit |
718e5a |
# endif
|
|
Packit |
718e5a |
# if HAVE_MEMSET_Z900_G5
|
|
Packit |
718e5a |
IFUNC_IMPL_ADD (array, i, bzero, 1, BZERO_Z900_G5)
|
|
Packit |
718e5a |
# endif
|
|
Packit |
718e5a |
)
|
|
Packit |
637210 |
#endif /* HAVE_MEMSET_IFUNC */
|
|
Packit |
6c4009 |
|
|
Packit |
4fb3eb |
#if HAVE_MEMCMP_IFUNC
|
|
Packit |
6c4009 |
IFUNC_IMPL (i, name, memcmp,
|
|
Packit |
4fb3eb |
# if HAVE_MEMCMP_Z196
|
|
Packit |
6c4009 |
IFUNC_IMPL_ADD (array, i, memcmp,
|
|
Packit |
4fb3eb |
S390_IS_Z196 (stfle_bits), MEMCMP_Z196)
|
|
Packit |
4fb3eb |
# endif
|
|
Packit |
4fb3eb |
# if HAVE_MEMCMP_Z10
|
|
Packit |
6c4009 |
IFUNC_IMPL_ADD (array, i, memcmp,
|
|
Packit |
4fb3eb |
S390_IS_Z10 (stfle_bits), MEMCMP_Z10)
|
|
Packit |
4fb3eb |
# endif
|
|
Packit |
4fb3eb |
# if HAVE_MEMCMP_Z900_G5
|
|
Packit |
4fb3eb |
IFUNC_IMPL_ADD (array, i, memcmp, 1, MEMCMP_Z900_G5)
|
|
Packit |
4fb3eb |
# endif
|
|
Packit |
4fb3eb |
)
|
|
Packit |
4fb3eb |
#endif /* HAVE_MEMCMP_IFUNC */
|
|
Packit |
6c4009 |
|
|
Packit |
a65cea |
#if HAVE_MEMCPY_IFUNC
|
|
Packit |
6c4009 |
IFUNC_IMPL (i, name, memcpy,
|
|
Packit |
a65cea |
# if HAVE_MEMCPY_Z196
|
|
Packit |
6c4009 |
IFUNC_IMPL_ADD (array, i, memcpy,
|
|
Packit |
a65cea |
S390_IS_Z196 (stfle_bits), MEMCPY_Z196)
|
|
Packit |
a65cea |
# endif
|
|
Packit |
a65cea |
# if HAVE_MEMCPY_Z10
|
|
Packit |
6c4009 |
IFUNC_IMPL_ADD (array, i, memcpy,
|
|
Packit |
a65cea |
S390_IS_Z10 (stfle_bits), MEMCPY_Z10)
|
|
Packit |
a65cea |
# endif
|
|
Packit |
a65cea |
# if HAVE_MEMCPY_Z900_G5
|
|
Packit |
a65cea |
IFUNC_IMPL_ADD (array, i, memcpy, 1, MEMCPY_Z900_G5)
|
|
Packit |
a65cea |
# endif
|
|
Packit |
a65cea |
)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_IMPL (i, name, mempcpy,
|
|
Packit |
a65cea |
# if HAVE_MEMCPY_Z196
|
|
Packit |
6c4009 |
IFUNC_IMPL_ADD (array, i, mempcpy,
|
|
Packit |
a65cea |
S390_IS_Z196 (stfle_bits), MEMPCPY_Z196)
|
|
Packit |
a65cea |
# endif
|
|
Packit |
a65cea |
# if HAVE_MEMCPY_Z10
|
|
Packit |
6c4009 |
IFUNC_IMPL_ADD (array, i, mempcpy,
|
|
Packit |
a65cea |
S390_IS_Z10 (stfle_bits), MEMPCPY_Z10)
|
|
Packit |
a65cea |
# endif
|
|
Packit |
a65cea |
# if HAVE_MEMCPY_Z900_G5
|
|
Packit |
a65cea |
IFUNC_IMPL_ADD (array, i, mempcpy, 1, MEMPCPY_Z900_G5)
|
|
Packit |
a65cea |
# endif
|
|
Packit |
a65cea |
)
|
|
Packit |
a65cea |
#endif /* HAVE_MEMCPY_IFUNC */
|
|
Packit |
6c4009 |
|
|
Packit |
61cd83 |
#if HAVE_MEMMOVE_IFUNC
|
|
Packit |
61cd83 |
IFUNC_IMPL (i, name, memmove,
|
|
Packit |
61cd83 |
# if HAVE_MEMMOVE_Z13
|
|
Packit |
61cd83 |
IFUNC_IMPL_ADD (array, i, memmove,
|
|
Packit |
61cd83 |
dl_hwcap & HWCAP_S390_VX, MEMMOVE_Z13)
|
|
Packit |
61cd83 |
# endif
|
|
Packit |
61cd83 |
# if HAVE_MEMMOVE_C
|
|
Packit |
61cd83 |
IFUNC_IMPL_ADD (array, i, memmove, 1, MEMMOVE_C)
|
|
Packit |
61cd83 |
# endif
|
|
Packit |
61cd83 |
)
|
|
Packit |
61cd83 |
#endif /* HAVE_MEMMOVE_IFUNC */
|
|
Packit |
61cd83 |
|
|
Packit |
b82062 |
#if HAVE_STRSTR_IFUNC
|
|
Packit |
b82062 |
IFUNC_IMPL (i, name, strstr,
|
|
Packit |
b82062 |
# if HAVE_STRSTR_Z13
|
|
Packit |
b82062 |
IFUNC_IMPL_ADD (array, i, strstr,
|
|
Packit |
b82062 |
dl_hwcap & HWCAP_S390_VX, STRSTR_Z13)
|
|
Packit |
b82062 |
# endif
|
|
Packit |
b82062 |
# if HAVE_STRSTR_C
|
|
Packit |
b82062 |
IFUNC_IMPL_ADD (array, i, strstr, 1, STRSTR_C)
|
|
Packit |
b82062 |
# endif
|
|
Packit |
b82062 |
)
|
|
Packit |
b82062 |
#endif /* HAVE_STRSTR_IFUNC */
|
|
Packit |
b82062 |
|
|
Packit |
a5344b |
#if HAVE_MEMMEM_IFUNC
|
|
Packit |
a5344b |
IFUNC_IMPL (i, name, memmem,
|
|
Packit |
a5344b |
# if HAVE_MEMMEM_Z13
|
|
Packit |
a5344b |
IFUNC_IMPL_ADD (array, i, memmem,
|
|
Packit |
a5344b |
dl_hwcap & HWCAP_S390_VX, MEMMEM_Z13)
|
|
Packit |
a5344b |
# endif
|
|
Packit |
a5344b |
# if HAVE_MEMMEM_C
|
|
Packit |
a5344b |
IFUNC_IMPL_ADD (array, i, memmem, 1, MEMMEM_C)
|
|
Packit |
a5344b |
# endif
|
|
Packit |
a5344b |
)
|
|
Packit |
a5344b |
#endif /* HAVE_MEMMEM_IFUNC */
|
|
Packit |
a5344b |
|
|
Packit |
7b69de |
#if HAVE_STRLEN_IFUNC
|
|
Packit |
7b69de |
IFUNC_IMPL (i, name, strlen,
|
|
Packit |
7b69de |
# if HAVE_STRLEN_Z13
|
|
Packit |
7b69de |
IFUNC_IMPL_ADD (array, i, strlen,
|
|
Packit |
7b69de |
dl_hwcap & HWCAP_S390_VX, STRLEN_Z13)
|
|
Packit |
7b69de |
# endif
|
|
Packit |
7b69de |
# if HAVE_STRLEN_C
|
|
Packit |
7b69de |
IFUNC_IMPL_ADD (array, i, strlen, 1, STRLEN_C)
|
|
Packit |
7b69de |
# endif
|
|
Packit |
7b69de |
)
|
|
Packit |
7b69de |
#endif /* HAVE_STRLEN_IFUNC */
|
|
Packit |
7b69de |
|
|
Packit |
50c855 |
#if HAVE_STRNLEN_IFUNC
|
|
Packit |
50c855 |
IFUNC_IMPL (i, name, strnlen,
|
|
Packit |
50c855 |
# if HAVE_STRNLEN_Z13
|
|
Packit |
50c855 |
IFUNC_IMPL_ADD (array, i, strnlen,
|
|
Packit |
50c855 |
dl_hwcap & HWCAP_S390_VX, STRNLEN_Z13)
|
|
Packit |
50c855 |
# endif
|
|
Packit |
50c855 |
# if HAVE_STRNLEN_C
|
|
Packit |
50c855 |
IFUNC_IMPL_ADD (array, i, strnlen, 1, STRNLEN_C)
|
|
Packit |
50c855 |
# endif
|
|
Packit |
50c855 |
)
|
|
Packit |
50c855 |
#endif /* HAVE_STRNLEN_IFUNC */
|
|
Packit |
50c855 |
|
|
Packit |
442c2a |
#if HAVE_STRCPY_IFUNC
|
|
Packit |
442c2a |
IFUNC_IMPL (i, name, strcpy,
|
|
Packit |
442c2a |
# if HAVE_STRCPY_Z13
|
|
Packit |
442c2a |
IFUNC_IMPL_ADD (array, i, strcpy,
|
|
Packit |
442c2a |
dl_hwcap & HWCAP_S390_VX, STRCPY_Z13)
|
|
Packit |
442c2a |
# endif
|
|
Packit |
442c2a |
# if HAVE_STRCPY_Z900_G5
|
|
Packit |
442c2a |
IFUNC_IMPL_ADD (array, i, strcpy, 1, STRCPY_Z900_G5)
|
|
Packit |
442c2a |
# endif
|
|
Packit |
442c2a |
)
|
|
Packit |
442c2a |
#endif /* HAVE_STRCPY_IFUNC */
|
|
Packit |
442c2a |
|
|
Packit |
138bad |
#if HAVE_STPCPY_IFUNC
|
|
Packit |
138bad |
IFUNC_IMPL (i, name, stpcpy,
|
|
Packit |
138bad |
# if HAVE_STPCPY_Z13
|
|
Packit |
138bad |
IFUNC_IMPL_ADD (array, i, stpcpy,
|
|
Packit |
138bad |
dl_hwcap & HWCAP_S390_VX, STPCPY_Z13)
|
|
Packit |
138bad |
# endif
|
|
Packit |
138bad |
# if HAVE_STPCPY_C
|
|
Packit |
138bad |
IFUNC_IMPL_ADD (array, i, stpcpy, 1, STPCPY_C)
|
|
Packit |
138bad |
# endif
|
|
Packit |
138bad |
)
|
|
Packit |
138bad |
#endif /* HAVE_STPCPY_IFUNC */
|
|
Packit |
138bad |
|
|
Packit |
1e4663 |
#if HAVE_STRNCPY_IFUNC
|
|
Packit |
1e4663 |
IFUNC_IMPL (i, name, strncpy,
|
|
Packit |
1e4663 |
# if HAVE_STRNCPY_Z13
|
|
Packit |
1e4663 |
IFUNC_IMPL_ADD (array, i, strncpy,
|
|
Packit |
1e4663 |
dl_hwcap & HWCAP_S390_VX, STRNCPY_Z13)
|
|
Packit |
1e4663 |
# endif
|
|
Packit |
1e4663 |
# if HAVE_STRNCPY_Z900_G5
|
|
Packit |
1e4663 |
IFUNC_IMPL_ADD (array, i, strncpy, 1, STRNCPY_Z900_G5)
|
|
Packit |
1e4663 |
# endif
|
|
Packit |
1e4663 |
)
|
|
Packit |
1e4663 |
#endif /* HAVE_STRNCPY_IFUNC */
|
|
Packit |
1e4663 |
|
|
Packit |
1df751 |
#if HAVE_STPNCPY_IFUNC
|
|
Packit |
1df751 |
IFUNC_IMPL (i, name, stpncpy,
|
|
Packit |
1df751 |
# if HAVE_STPNCPY_Z13
|
|
Packit |
1df751 |
IFUNC_IMPL_ADD (array, i, stpncpy,
|
|
Packit |
1df751 |
dl_hwcap & HWCAP_S390_VX, STPNCPY_Z13)
|
|
Packit |
1df751 |
# endif
|
|
Packit |
1df751 |
# if HAVE_STPNCPY_C
|
|
Packit |
1df751 |
IFUNC_IMPL_ADD (array, i, stpncpy, 1, STPNCPY_C)
|
|
Packit |
1df751 |
# endif
|
|
Packit |
1df751 |
)
|
|
Packit |
1df751 |
#endif /* HAVE_STPNCPY_IFUNC */
|
|
Packit |
1df751 |
|
|
Packit |
78c3d4 |
#if HAVE_STRCAT_IFUNC
|
|
Packit |
78c3d4 |
IFUNC_IMPL (i, name, strcat,
|
|
Packit |
78c3d4 |
# if HAVE_STRCAT_Z13
|
|
Packit |
78c3d4 |
IFUNC_IMPL_ADD (array, i, strcat,
|
|
Packit |
78c3d4 |
dl_hwcap & HWCAP_S390_VX, STRCAT_Z13)
|
|
Packit |
78c3d4 |
# endif
|
|
Packit |
78c3d4 |
# if HAVE_STRCAT_C
|
|
Packit |
78c3d4 |
IFUNC_IMPL_ADD (array, i, strcat, 1, STRCAT_C)
|
|
Packit |
78c3d4 |
# endif
|
|
Packit |
78c3d4 |
)
|
|
Packit |
78c3d4 |
#endif /* HAVE_STRCAT_IFUNC */
|
|
Packit |
1e4663 |
|
|
Packit |
24e75d |
#if HAVE_STRNCAT_IFUNC
|
|
Packit |
24e75d |
IFUNC_IMPL (i, name, strncat,
|
|
Packit |
24e75d |
# if HAVE_STRNCAT_Z13
|
|
Packit |
24e75d |
IFUNC_IMPL_ADD (array, i, strncat,
|
|
Packit |
24e75d |
dl_hwcap & HWCAP_S390_VX, STRNCAT_Z13)
|
|
Packit |
24e75d |
# endif
|
|
Packit |
24e75d |
# if HAVE_STRNCAT_C
|
|
Packit |
24e75d |
IFUNC_IMPL_ADD (array, i, strncat, 1, STRNCAT_C)
|
|
Packit |
24e75d |
# endif
|
|
Packit |
24e75d |
)
|
|
Packit |
24e75d |
#endif /* HAVE_STRNCAT_IFUNC */
|
|
Packit |
24e75d |
|
|
Packit |
360467 |
#if HAVE_STRCMP_IFUNC
|
|
Packit |
360467 |
IFUNC_IMPL (i, name, strcmp,
|
|
Packit |
360467 |
# if HAVE_STRCMP_Z13
|
|
Packit |
360467 |
IFUNC_IMPL_ADD (array, i, strcmp,
|
|
Packit |
360467 |
dl_hwcap & HWCAP_S390_VX, STRCMP_Z13)
|
|
Packit |
360467 |
# endif
|
|
Packit |
360467 |
# if HAVE_STRCMP_Z900_G5
|
|
Packit |
360467 |
IFUNC_IMPL_ADD (array, i, strcmp, 1, STRCMP_Z900_G5)
|
|
Packit |
360467 |
# endif
|
|
Packit |
360467 |
)
|
|
Packit |
360467 |
#endif /* HAVE_STRCMP_IFUNC */
|
|
Packit |
360467 |
|
|
Packit |
2d41f9 |
#if HAVE_STRNCMP_IFUNC
|
|
Packit |
2d41f9 |
IFUNC_IMPL (i, name, strncmp,
|
|
Packit |
2d41f9 |
# if HAVE_STRNCMP_Z13
|
|
Packit |
2d41f9 |
IFUNC_IMPL_ADD (array, i, strncmp,
|
|
Packit |
2d41f9 |
dl_hwcap & HWCAP_S390_VX, STRNCMP_Z13)
|
|
Packit |
2d41f9 |
# endif
|
|
Packit |
2d41f9 |
# if HAVE_STRNCMP_C
|
|
Packit |
2d41f9 |
IFUNC_IMPL_ADD (array, i, strncmp, 1, STRNCMP_C)
|
|
Packit |
2d41f9 |
# endif
|
|
Packit |
2d41f9 |
)
|
|
Packit |
2d41f9 |
#endif /* HAVE_STRNCMP_IFUNC */
|
|
Packit |
2d41f9 |
|
|
Packit |
d4c9c9 |
#if HAVE_STRCHR_IFUNC
|
|
Packit |
d4c9c9 |
IFUNC_IMPL (i, name, strchr,
|
|
Packit |
d4c9c9 |
# if HAVE_STRCHR_Z13
|
|
Packit |
d4c9c9 |
IFUNC_IMPL_ADD (array, i, strchr,
|
|
Packit |
d4c9c9 |
dl_hwcap & HWCAP_S390_VX, STRCHR_Z13)
|
|
Packit |
d4c9c9 |
# endif
|
|
Packit |
d4c9c9 |
# if HAVE_STRCHR_C
|
|
Packit |
d4c9c9 |
IFUNC_IMPL_ADD (array, i, strchr, 1, STRCHR_C)
|
|
Packit |
d4c9c9 |
# endif
|
|
Packit |
d4c9c9 |
)
|
|
Packit |
d4c9c9 |
#endif /* HAVE_STRCHR_IFUNC */
|
|
Packit |
d4c9c9 |
|
|
Packit |
782a64 |
#if HAVE_STRCHRNUL_IFUNC
|
|
Packit |
782a64 |
IFUNC_IMPL (i, name, strchrnul,
|
|
Packit |
782a64 |
# if HAVE_STRCHRNUL_Z13
|
|
Packit |
782a64 |
IFUNC_IMPL_ADD (array, i, strchrnul,
|
|
Packit |
782a64 |
dl_hwcap & HWCAP_S390_VX, STRCHRNUL_Z13)
|
|
Packit |
782a64 |
# endif
|
|
Packit |
782a64 |
# if HAVE_STRCHRNUL_C
|
|
Packit |
782a64 |
IFUNC_IMPL_ADD (array, i, strchrnul, 1, STRCHRNUL_C)
|
|
Packit |
782a64 |
# endif
|
|
Packit |
782a64 |
)
|
|
Packit |
782a64 |
#endif /* HAVE_STRCHRNUL_IFUNC */
|
|
Packit |
782a64 |
|
|
Packit |
2e49c9 |
#if HAVE_STRRCHR_IFUNC
|
|
Packit |
2e49c9 |
IFUNC_IMPL (i, name, strrchr,
|
|
Packit |
2e49c9 |
# if HAVE_STRRCHR_Z13
|
|
Packit |
2e49c9 |
IFUNC_IMPL_ADD (array, i, strrchr,
|
|
Packit |
2e49c9 |
dl_hwcap & HWCAP_S390_VX, STRRCHR_Z13)
|
|
Packit |
2e49c9 |
# endif
|
|
Packit |
2e49c9 |
# if HAVE_STRRCHR_C
|
|
Packit |
2e49c9 |
IFUNC_IMPL_ADD (array, i, strrchr, 1, STRRCHR_C)
|
|
Packit |
2e49c9 |
# endif
|
|
Packit |
2e49c9 |
)
|
|
Packit |
2e49c9 |
#endif /* HAVE_STRRCHR_IFUNC */
|
|
Packit |
2e49c9 |
|
|
Packit |
c0fcf4 |
#if HAVE_STRSPN_IFUNC
|
|
Packit |
c0fcf4 |
IFUNC_IMPL (i, name, strspn,
|
|
Packit |
c0fcf4 |
# if HAVE_STRSPN_Z13
|
|
Packit |
c0fcf4 |
IFUNC_IMPL_ADD (array, i, strspn,
|
|
Packit |
c0fcf4 |
dl_hwcap & HWCAP_S390_VX, STRSPN_Z13)
|
|
Packit |
c0fcf4 |
# endif
|
|
Packit |
c0fcf4 |
# if HAVE_STRSPN_C
|
|
Packit |
c0fcf4 |
IFUNC_IMPL_ADD (array, i, strspn, 1, STRSPN_C)
|
|
Packit |
c0fcf4 |
# endif
|
|
Packit |
c0fcf4 |
)
|
|
Packit |
c0fcf4 |
#endif /* HAVE_STRSPN_IFUNC */
|
|
Packit |
c0fcf4 |
|
|
Packit |
492e9e |
#if HAVE_STRPBRK_IFUNC
|
|
Packit |
492e9e |
IFUNC_IMPL (i, name, strpbrk,
|
|
Packit |
492e9e |
# if HAVE_STRPBRK_Z13
|
|
Packit |
492e9e |
IFUNC_IMPL_ADD (array, i, strpbrk,
|
|
Packit |
492e9e |
dl_hwcap & HWCAP_S390_VX, STRPBRK_Z13)
|
|
Packit |
492e9e |
# endif
|
|
Packit |
492e9e |
# if HAVE_STRPBRK_C
|
|
Packit |
492e9e |
IFUNC_IMPL_ADD (array, i, strpbrk, 1, STRPBRK_C)
|
|
Packit |
492e9e |
# endif
|
|
Packit |
492e9e |
)
|
|
Packit |
492e9e |
#endif /* HAVE_STRPBRK_IFUNC */
|
|
Packit |
492e9e |
|
|
Packit |
2cd3b1 |
#if HAVE_STRCSPN_IFUNC
|
|
Packit |
2cd3b1 |
IFUNC_IMPL (i, name, strcspn,
|
|
Packit |
2cd3b1 |
# if HAVE_STRCSPN_Z13
|
|
Packit |
2cd3b1 |
IFUNC_IMPL_ADD (array, i, strcspn,
|
|
Packit |
2cd3b1 |
dl_hwcap & HWCAP_S390_VX, STRCSPN_Z13)
|
|
Packit |
2cd3b1 |
# endif
|
|
Packit |
2cd3b1 |
# if HAVE_STRCSPN_C
|
|
Packit |
2cd3b1 |
IFUNC_IMPL_ADD (array, i, strcspn, 1, STRCSPN_C)
|
|
Packit |
2cd3b1 |
# endif
|
|
Packit |
2cd3b1 |
)
|
|
Packit |
2cd3b1 |
#endif /* HAVE_STRCSPN_IFUNC */
|
|
Packit |
2cd3b1 |
|
|
Packit |
e222d3 |
#if HAVE_MEMCHR_IFUNC
|
|
Packit |
e222d3 |
IFUNC_IMPL (i, name, memchr,
|
|
Packit |
e222d3 |
# if HAVE_MEMCHR_Z13
|
|
Packit |
e222d3 |
IFUNC_IMPL_ADD (array, i, memchr,
|
|
Packit |
e222d3 |
dl_hwcap & HWCAP_S390_VX, MEMCHR_Z13)
|
|
Packit |
e222d3 |
# endif
|
|
Packit |
e222d3 |
# if HAVE_MEMCHR_Z900_G5
|
|
Packit |
e222d3 |
IFUNC_IMPL_ADD (array, i, memchr, 1, MEMCHR_Z900_G5)
|
|
Packit |
e222d3 |
# endif
|
|
Packit |
e222d3 |
)
|
|
Packit |
e222d3 |
#endif /* HAVE_MEMCHR_IFUNC */
|
|
Packit |
e222d3 |
|
|
Packit |
4a522b |
#if HAVE_RAWMEMCHR_IFUNC
|
|
Packit |
4a522b |
IFUNC_IMPL (i, name, rawmemchr,
|
|
Packit |
4a522b |
# if HAVE_RAWMEMCHR_Z13
|
|
Packit |
4a522b |
IFUNC_IMPL_ADD (array, i, rawmemchr,
|
|
Packit |
4a522b |
dl_hwcap & HWCAP_S390_VX, RAWMEMCHR_Z13)
|
|
Packit |
4a522b |
# endif
|
|
Packit |
4a522b |
# if HAVE_RAWMEMCHR_C
|
|
Packit |
4a522b |
IFUNC_IMPL_ADD (array, i, rawmemchr, 1, RAWMEMCHR_C)
|
|
Packit |
4a522b |
# endif
|
|
Packit |
4a522b |
)
|
|
Packit |
4a522b |
#endif /* HAVE_RAWMEMCHR_IFUNC */
|
|
Packit |
4a522b |
|
|
Packit |
93954a |
#if HAVE_MEMCCPY_IFUNC
|
|
Packit |
93954a |
IFUNC_IMPL (i, name, memccpy,
|
|
Packit |
93954a |
# if HAVE_MEMCCPY_Z13
|
|
Packit |
93954a |
IFUNC_IMPL_ADD (array, i, memccpy,
|
|
Packit |
93954a |
dl_hwcap & HWCAP_S390_VX, MEMCCPY_Z13)
|
|
Packit |
93954a |
# endif
|
|
Packit |
93954a |
# if HAVE_MEMCCPY_C
|
|
Packit |
93954a |
IFUNC_IMPL_ADD (array, i, memccpy, 1, MEMCCPY_C)
|
|
Packit |
93954a |
# endif
|
|
Packit |
93954a |
)
|
|
Packit |
93954a |
#endif /* HAVE_MEMCCPY_IFUNC */
|
|
Packit |
93954a |
|
|
Packit |
0dcf6e |
#if HAVE_MEMRCHR_IFUNC
|
|
Packit |
0dcf6e |
IFUNC_IMPL (i, name, memrchr,
|
|
Packit |
0dcf6e |
# if HAVE_MEMRCHR_Z13
|
|
Packit |
0dcf6e |
IFUNC_IMPL_ADD (array, i, memrchr,
|
|
Packit |
0dcf6e |
dl_hwcap & HWCAP_S390_VX, MEMRCHR_Z13)
|
|
Packit |
0dcf6e |
# endif
|
|
Packit |
0dcf6e |
# if HAVE_MEMRCHR_C
|
|
Packit |
0dcf6e |
IFUNC_IMPL_ADD (array, i, memrchr, 1, MEMRCHR_C)
|
|
Packit |
0dcf6e |
# endif
|
|
Packit |
0dcf6e |
)
|
|
Packit |
0dcf6e |
#endif /* HAVE_MEMRCHR_IFUNC */
|
|
Packit |
0dcf6e |
|
|
Packit |
cdab98 |
#if HAVE_WCSLEN_IFUNC
|
|
Packit |
cdab98 |
IFUNC_IMPL (i, name, wcslen,
|
|
Packit |
cdab98 |
# if HAVE_WCSLEN_Z13
|
|
Packit |
cdab98 |
IFUNC_IMPL_ADD (array, i, wcslen,
|
|
Packit |
cdab98 |
dl_hwcap & HWCAP_S390_VX, WCSLEN_Z13)
|
|
Packit |
cdab98 |
# endif
|
|
Packit |
cdab98 |
# if HAVE_WCSLEN_C
|
|
Packit |
cdab98 |
IFUNC_IMPL_ADD (array, i, wcslen, 1, WCSLEN_C)
|
|
Packit |
cdab98 |
# endif
|
|
Packit |
cdab98 |
)
|
|
Packit |
cdab98 |
#endif /* HAVE_WCSLEN_IFUNC */
|
|
Packit |
cdab98 |
|
|
Packit |
a537e0 |
#if HAVE_WCSNLEN_IFUNC
|
|
Packit |
a537e0 |
IFUNC_IMPL (i, name, wcsnlen,
|
|
Packit |
a537e0 |
# if HAVE_WCSNLEN_Z13
|
|
Packit |
a537e0 |
IFUNC_IMPL_ADD (array, i, wcsnlen,
|
|
Packit |
a537e0 |
dl_hwcap & HWCAP_S390_VX, WCSNLEN_Z13)
|
|
Packit |
a537e0 |
# endif
|
|
Packit |
a537e0 |
# if HAVE_WCSNLEN_C
|
|
Packit |
a537e0 |
IFUNC_IMPL_ADD (array, i, wcsnlen, 1, WCSNLEN_C)
|
|
Packit |
a537e0 |
# endif
|
|
Packit |
a537e0 |
)
|
|
Packit |
a537e0 |
#endif /* HAVE_WCSNLEN_IFUNC */
|
|
Packit |
a537e0 |
|
|
Packit |
5f7343 |
#if HAVE_WCSCPY_IFUNC
|
|
Packit |
5f7343 |
IFUNC_IMPL (i, name, wcscpy,
|
|
Packit |
5f7343 |
# if HAVE_WCSCPY_Z13
|
|
Packit |
5f7343 |
IFUNC_IMPL_ADD (array, i, wcscpy,
|
|
Packit |
5f7343 |
dl_hwcap & HWCAP_S390_VX, WCSCPY_Z13)
|
|
Packit |
5f7343 |
# endif
|
|
Packit |
5f7343 |
# if HAVE_WCSCPY_C
|
|
Packit |
5f7343 |
IFUNC_IMPL_ADD (array, i, wcscpy, 1, WCSCPY_C)
|
|
Packit |
5f7343 |
# endif
|
|
Packit |
5f7343 |
)
|
|
Packit |
5f7343 |
#endif /* HAVE_WCSCPY_IFUNC */
|
|
Packit |
5f7343 |
|
|
Packit |
27bf7e |
#if HAVE_WCPCPY_IFUNC
|
|
Packit |
27bf7e |
IFUNC_IMPL (i, name, wcpcpy,
|
|
Packit |
27bf7e |
# if HAVE_WCPCPY_Z13
|
|
Packit |
27bf7e |
IFUNC_IMPL_ADD (array, i, wcpcpy,
|
|
Packit |
27bf7e |
dl_hwcap & HWCAP_S390_VX, WCPCPY_Z13)
|
|
Packit |
27bf7e |
# endif
|
|
Packit |
27bf7e |
# if HAVE_WCPCPY_C
|
|
Packit |
27bf7e |
IFUNC_IMPL_ADD (array, i, wcpcpy, 1, WCPCPY_C)
|
|
Packit |
27bf7e |
# endif
|
|
Packit |
27bf7e |
)
|
|
Packit |
27bf7e |
#endif /* HAVE_WCPCPY_IFUNC */
|
|
Packit |
27bf7e |
|
|
Packit |
fae013 |
#if HAVE_WCSNCPY_IFUNC
|
|
Packit |
fae013 |
IFUNC_IMPL (i, name, wcsncpy,
|
|
Packit |
fae013 |
# if HAVE_WCSNCPY_Z13
|
|
Packit |
fae013 |
IFUNC_IMPL_ADD (array, i, wcsncpy,
|
|
Packit |
fae013 |
dl_hwcap & HWCAP_S390_VX, WCSNCPY_Z13)
|
|
Packit |
fae013 |
# endif
|
|
Packit |
fae013 |
# if HAVE_WCSNCPY_C
|
|
Packit |
fae013 |
IFUNC_IMPL_ADD (array, i, wcsncpy, 1, WCSNCPY_C)
|
|
Packit |
fae013 |
# endif
|
|
Packit |
fae013 |
)
|
|
Packit |
fae013 |
#endif /* HAVE_WCSNCPY_IFUNC */
|
|
Packit |
fae013 |
|
|
Packit |
6c4009 |
#ifdef HAVE_S390_VX_ASM_SUPPORT
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# define IFUNC_VX_IMPL(FUNC) \
|
|
Packit |
6c4009 |
IFUNC_IMPL (i, name, FUNC, \
|
|
Packit |
6c4009 |
IFUNC_IMPL_ADD (array, i, FUNC, dl_hwcap & HWCAP_S390_VX, \
|
|
Packit |
6c4009 |
__##FUNC##_vx) \
|
|
Packit |
6c4009 |
IFUNC_IMPL_ADD (array, i, FUNC, 1, __##FUNC##_c))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wcpncpy);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wcscat);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wcsncat);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wcscmp);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wcsncmp);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wcschr);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wcschrnul);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wcsrchr);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wcsspn);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wcspbrk);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wcscspn);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wmemchr);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wmemset);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
IFUNC_VX_IMPL (wmemcmp);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#endif /* HAVE_S390_VX_ASM_SUPPORT */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
return i;
|
|
Packit |
6c4009 |
}
|