Blame sysdeps/s390/multiarch/ifunc-impl-list.c

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 Service 524755
#include <ifunc-memset.h>
Packit Service f40d09
#include <ifunc-memcmp.h>
Packit Service f94323
#include <ifunc-memcpy.h>
Packit Service 24b7ff
#include <ifunc-strstr.h>
Packit Service 2842d1
#include <ifunc-memmem.h>
Packit Service d48808
#include <ifunc-strlen.h>
Packit Service 0cadbc
#include <ifunc-strnlen.h>
Packit Service 9fad10
#include <ifunc-strcpy.h>
Packit Service 728483
#include <ifunc-stpcpy.h>
Packit Service b92345
#include <ifunc-strncpy.h>
Packit Service 264ebd
#include <ifunc-stpncpy.h>
Packit Service 3012dd
#include <ifunc-strcat.h>
Packit Service 0ed5cb
#include <ifunc-strncat.h>
Packit Service 399c1d
#include <ifunc-strcmp.h>
Packit Service 73ffc0
#include <ifunc-strncmp.h>
Packit Service f904ac
#include <ifunc-strchr.h>
Packit Service 58c34d
#include <ifunc-strchrnul.h>
Packit Service 1de18b
#include <ifunc-strrchr.h>
Packit Service ffdfae
#include <ifunc-strspn.h>
Packit Service b1cbc0
#include <ifunc-strpbrk.h>
Packit Service 67e387
#include <ifunc-strcspn.h>
Packit Service 215f27
#include <ifunc-memchr.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 Service 524755
#if HAVE_MEMSET_IFUNC
Packit 6c4009
  IFUNC_IMPL (i, name, memset,
Packit Service 524755
# if HAVE_MEMSET_Z196
Packit 6c4009
	      IFUNC_IMPL_ADD (array, i, memset,
Packit Service 524755
			      S390_IS_Z196 (stfle_bits), MEMSET_Z196)
Packit Service 524755
# endif
Packit Service 524755
# if HAVE_MEMSET_Z10
Packit 6c4009
	      IFUNC_IMPL_ADD (array, i, memset,
Packit Service 524755
			      S390_IS_Z10 (stfle_bits), MEMSET_Z10)
Packit Service 524755
# endif
Packit Service 524755
# if HAVE_MEMSET_Z900_G5
Packit Service 524755
	      IFUNC_IMPL_ADD (array, i, memset, 1, MEMSET_Z900_G5)
Packit Service 524755
# endif
Packit Service 524755
	      )
Packit Service 9320c0
Packit Service 9320c0
  /* Note: bzero is implemented in memset.  */
Packit Service 9320c0
  IFUNC_IMPL (i, name, bzero,
Packit Service 9320c0
# if HAVE_MEMSET_Z196
Packit Service 9320c0
	      IFUNC_IMPL_ADD (array, i, bzero,
Packit Service 9320c0
			      S390_IS_Z196 (stfle_bits), BZERO_Z196)
Packit Service 9320c0
# endif
Packit Service 9320c0
# if HAVE_MEMSET_Z10
Packit Service 9320c0
	      IFUNC_IMPL_ADD (array, i, bzero,
Packit Service 9320c0
			      S390_IS_Z10 (stfle_bits), BZERO_Z10)
Packit Service 9320c0
# endif
Packit Service 9320c0
# if HAVE_MEMSET_Z900_G5
Packit Service 9320c0
	      IFUNC_IMPL_ADD (array, i, bzero, 1, BZERO_Z900_G5)
Packit Service 9320c0
# endif
Packit Service 9320c0
	      )
Packit Service 524755
#endif /* HAVE_MEMSET_IFUNC */
Packit Service 3b0880
Packit Service f40d09
#if HAVE_MEMCMP_IFUNC
Packit 6c4009
  IFUNC_IMPL (i, name, memcmp,
Packit Service f40d09
# if HAVE_MEMCMP_Z196
Packit 6c4009
	      IFUNC_IMPL_ADD (array, i, memcmp,
Packit Service f40d09
			      S390_IS_Z196 (stfle_bits), MEMCMP_Z196)
Packit Service f40d09
# endif
Packit Service f40d09
# if HAVE_MEMCMP_Z10
Packit 6c4009
	      IFUNC_IMPL_ADD (array, i, memcmp,
Packit Service f40d09
			      S390_IS_Z10 (stfle_bits), MEMCMP_Z10)
Packit Service f40d09
# endif
Packit Service f40d09
# if HAVE_MEMCMP_Z900_G5
Packit Service f40d09
	      IFUNC_IMPL_ADD (array, i, memcmp, 1, MEMCMP_Z900_G5)
Packit Service f40d09
# endif
Packit Service f40d09
	      )
Packit Service f40d09
#endif /* HAVE_MEMCMP_IFUNC */
Packit Service 3b0880
Packit Service f94323
#if HAVE_MEMCPY_IFUNC
Packit 6c4009
  IFUNC_IMPL (i, name, memcpy,
Packit Service f94323
# if HAVE_MEMCPY_Z196
Packit 6c4009
	      IFUNC_IMPL_ADD (array, i, memcpy,
Packit Service f94323
			      S390_IS_Z196 (stfle_bits), MEMCPY_Z196)
Packit Service f94323
# endif
Packit Service f94323
# if HAVE_MEMCPY_Z10
Packit 6c4009
	      IFUNC_IMPL_ADD (array, i, memcpy,
Packit Service f94323
			      S390_IS_Z10 (stfle_bits), MEMCPY_Z10)
Packit Service f94323
# endif
Packit Service f94323
# if HAVE_MEMCPY_Z900_G5
Packit Service f94323
	      IFUNC_IMPL_ADD (array, i, memcpy, 1, MEMCPY_Z900_G5)
Packit Service f94323
# endif
Packit Service f94323
	      )
Packit 6c4009
Packit 6c4009
  IFUNC_IMPL (i, name, mempcpy,
Packit Service f94323
# if HAVE_MEMCPY_Z196
Packit 6c4009
	      IFUNC_IMPL_ADD (array, i, mempcpy,
Packit Service f94323
			      S390_IS_Z196 (stfle_bits), MEMPCPY_Z196)
Packit Service f94323
# endif
Packit Service f94323
# if HAVE_MEMCPY_Z10
Packit 6c4009
	      IFUNC_IMPL_ADD (array, i, mempcpy,
Packit Service f94323
			      S390_IS_Z10 (stfle_bits), MEMPCPY_Z10)
Packit Service f94323
# endif
Packit Service f94323
# if HAVE_MEMCPY_Z900_G5
Packit Service f94323
	      IFUNC_IMPL_ADD (array, i, mempcpy, 1, MEMPCPY_Z900_G5)
Packit Service f94323
# endif
Packit Service f94323
	      )
Packit Service f94323
#endif /* HAVE_MEMCPY_IFUNC  */
Packit Service 3b0880
Packit Service 770b35
#if HAVE_MEMMOVE_IFUNC
Packit Service 770b35
    IFUNC_IMPL (i, name, memmove,
Packit Service 770b35
# if HAVE_MEMMOVE_Z13
Packit Service 770b35
		IFUNC_IMPL_ADD (array, i, memmove,
Packit Service 770b35
				dl_hwcap & HWCAP_S390_VX, MEMMOVE_Z13)
Packit Service 770b35
# endif
Packit Service 770b35
# if HAVE_MEMMOVE_C
Packit Service 770b35
		IFUNC_IMPL_ADD (array, i, memmove, 1, MEMMOVE_C)
Packit Service 770b35
# endif
Packit Service 770b35
		)
Packit Service 770b35
#endif /* HAVE_MEMMOVE_IFUNC  */
Packit Service 770b35
Packit Service 24b7ff
#if HAVE_STRSTR_IFUNC
Packit Service 24b7ff
    IFUNC_IMPL (i, name, strstr,
Packit Service 24b7ff
# if HAVE_STRSTR_Z13
Packit Service 24b7ff
		IFUNC_IMPL_ADD (array, i, strstr,
Packit Service 24b7ff
				dl_hwcap & HWCAP_S390_VX, STRSTR_Z13)
Packit Service 24b7ff
# endif
Packit Service 24b7ff
# if HAVE_STRSTR_C
Packit Service 24b7ff
		IFUNC_IMPL_ADD (array, i, strstr, 1, STRSTR_C)
Packit Service 24b7ff
# endif
Packit Service 24b7ff
		)
Packit Service 24b7ff
#endif /* HAVE_STRSTR_IFUNC  */
Packit Service 24b7ff
Packit Service 2842d1
#if HAVE_MEMMEM_IFUNC
Packit Service 2842d1
    IFUNC_IMPL (i, name, memmem,
Packit Service 2842d1
# if HAVE_MEMMEM_Z13
Packit Service 2842d1
		IFUNC_IMPL_ADD (array, i, memmem,
Packit Service 2842d1
				dl_hwcap & HWCAP_S390_VX, MEMMEM_Z13)
Packit Service 2842d1
# endif
Packit Service 2842d1
# if HAVE_MEMMEM_C
Packit Service 2842d1
		IFUNC_IMPL_ADD (array, i, memmem, 1, MEMMEM_C)
Packit Service 2842d1
# endif
Packit Service 2842d1
		)
Packit Service 2842d1
#endif /* HAVE_MEMMEM_IFUNC  */
Packit Service 2842d1
Packit Service d48808
#if HAVE_STRLEN_IFUNC
Packit Service d48808
    IFUNC_IMPL (i, name, strlen,
Packit Service d48808
# if HAVE_STRLEN_Z13
Packit Service d48808
		IFUNC_IMPL_ADD (array, i, strlen,
Packit Service d48808
				dl_hwcap & HWCAP_S390_VX, STRLEN_Z13)
Packit Service d48808
# endif
Packit Service d48808
# if HAVE_STRLEN_C
Packit Service d48808
		IFUNC_IMPL_ADD (array, i, strlen, 1, STRLEN_C)
Packit Service d48808
# endif
Packit Service d48808
		)
Packit Service d48808
#endif /* HAVE_STRLEN_IFUNC  */
Packit Service d48808
Packit Service 0cadbc
#if HAVE_STRNLEN_IFUNC
Packit Service 0cadbc
    IFUNC_IMPL (i, name, strnlen,
Packit Service 0cadbc
# if HAVE_STRNLEN_Z13
Packit Service 0cadbc
		IFUNC_IMPL_ADD (array, i, strnlen,
Packit Service 0cadbc
				dl_hwcap & HWCAP_S390_VX, STRNLEN_Z13)
Packit Service 0cadbc
# endif
Packit Service 0cadbc
# if HAVE_STRNLEN_C
Packit Service 0cadbc
		IFUNC_IMPL_ADD (array, i, strnlen, 1, STRNLEN_C)
Packit Service 0cadbc
# endif
Packit Service 0cadbc
		)
Packit Service 0cadbc
#endif /* HAVE_STRNLEN_IFUNC  */
Packit Service 0cadbc
Packit Service 9fad10
#if HAVE_STRCPY_IFUNC
Packit Service 9fad10
    IFUNC_IMPL (i, name, strcpy,
Packit Service 9fad10
# if HAVE_STRCPY_Z13
Packit Service 9fad10
		IFUNC_IMPL_ADD (array, i, strcpy,
Packit Service 9fad10
				dl_hwcap & HWCAP_S390_VX, STRCPY_Z13)
Packit Service 9fad10
# endif
Packit Service 9fad10
# if HAVE_STRCPY_Z900_G5
Packit Service 9fad10
		IFUNC_IMPL_ADD (array, i, strcpy, 1, STRCPY_Z900_G5)
Packit Service 9fad10
# endif
Packit Service 9fad10
		)
Packit Service 9fad10
#endif /* HAVE_STRCPY_IFUNC  */
Packit Service 9fad10
Packit Service 728483
#if HAVE_STPCPY_IFUNC
Packit Service 728483
    IFUNC_IMPL (i, name, stpcpy,
Packit Service 728483
# if HAVE_STPCPY_Z13
Packit Service 728483
		IFUNC_IMPL_ADD (array, i, stpcpy,
Packit Service 728483
				dl_hwcap & HWCAP_S390_VX, STPCPY_Z13)
Packit Service 728483
# endif
Packit Service 728483
# if HAVE_STPCPY_C
Packit Service 728483
		IFUNC_IMPL_ADD (array, i, stpcpy, 1, STPCPY_C)
Packit Service 728483
# endif
Packit Service 728483
		)
Packit Service 728483
#endif /* HAVE_STPCPY_IFUNC  */
Packit Service 728483
Packit Service b92345
#if HAVE_STRNCPY_IFUNC
Packit Service b92345
    IFUNC_IMPL (i, name, strncpy,
Packit Service b92345
# if HAVE_STRNCPY_Z13
Packit Service b92345
		IFUNC_IMPL_ADD (array, i, strncpy,
Packit Service b92345
				dl_hwcap & HWCAP_S390_VX, STRNCPY_Z13)
Packit Service b92345
# endif
Packit Service b92345
# if HAVE_STRNCPY_Z900_G5
Packit Service b92345
		IFUNC_IMPL_ADD (array, i, strncpy, 1, STRNCPY_Z900_G5)
Packit Service b92345
# endif
Packit Service b92345
		)
Packit Service b92345
#endif /* HAVE_STRNCPY_IFUNC  */
Packit Service b92345
Packit Service 264ebd
#if HAVE_STPNCPY_IFUNC
Packit Service 264ebd
    IFUNC_IMPL (i, name, stpncpy,
Packit Service 264ebd
# if HAVE_STPNCPY_Z13
Packit Service 264ebd
		IFUNC_IMPL_ADD (array, i, stpncpy,
Packit Service 264ebd
				dl_hwcap & HWCAP_S390_VX, STPNCPY_Z13)
Packit Service 264ebd
# endif
Packit Service 264ebd
# if HAVE_STPNCPY_C
Packit Service 264ebd
		IFUNC_IMPL_ADD (array, i, stpncpy, 1, STPNCPY_C)
Packit Service 264ebd
# endif
Packit Service 264ebd
		)
Packit Service 264ebd
#endif /* HAVE_STPNCPY_IFUNC  */
Packit Service 264ebd
Packit Service 3012dd
#if HAVE_STRCAT_IFUNC
Packit Service 3012dd
    IFUNC_IMPL (i, name, strcat,
Packit Service 3012dd
# if HAVE_STRCAT_Z13
Packit Service 3012dd
		IFUNC_IMPL_ADD (array, i, strcat,
Packit Service 3012dd
				dl_hwcap & HWCAP_S390_VX, STRCAT_Z13)
Packit Service 3012dd
# endif
Packit Service 3012dd
# if HAVE_STRCAT_C
Packit Service 3012dd
		IFUNC_IMPL_ADD (array, i, strcat, 1, STRCAT_C)
Packit Service 3012dd
# endif
Packit Service 3012dd
		)
Packit Service 3012dd
#endif /* HAVE_STRCAT_IFUNC  */
Packit Service b92345
Packit Service 0ed5cb
#if HAVE_STRNCAT_IFUNC
Packit Service 0ed5cb
    IFUNC_IMPL (i, name, strncat,
Packit Service 0ed5cb
# if HAVE_STRNCAT_Z13
Packit Service 0ed5cb
		IFUNC_IMPL_ADD (array, i, strncat,
Packit Service 0ed5cb
				dl_hwcap & HWCAP_S390_VX, STRNCAT_Z13)
Packit Service 0ed5cb
# endif
Packit Service 0ed5cb
# if HAVE_STRNCAT_C
Packit Service 0ed5cb
		IFUNC_IMPL_ADD (array, i, strncat, 1, STRNCAT_C)
Packit Service 0ed5cb
# endif
Packit Service 0ed5cb
		)
Packit Service 0ed5cb
#endif /* HAVE_STRNCAT_IFUNC  */
Packit Service 0ed5cb
Packit Service 399c1d
#if HAVE_STRCMP_IFUNC
Packit Service 399c1d
    IFUNC_IMPL (i, name, strcmp,
Packit Service 399c1d
# if HAVE_STRCMP_Z13
Packit Service 399c1d
		IFUNC_IMPL_ADD (array, i, strcmp,
Packit Service 399c1d
				dl_hwcap & HWCAP_S390_VX, STRCMP_Z13)
Packit Service 399c1d
# endif
Packit Service 399c1d
# if HAVE_STRCMP_Z900_G5
Packit Service 399c1d
		IFUNC_IMPL_ADD (array, i, strcmp, 1, STRCMP_Z900_G5)
Packit Service 399c1d
# endif
Packit Service 399c1d
		)
Packit Service 399c1d
#endif /* HAVE_STRCMP_IFUNC  */
Packit Service 399c1d
Packit Service 73ffc0
#if HAVE_STRNCMP_IFUNC
Packit Service 73ffc0
    IFUNC_IMPL (i, name, strncmp,
Packit Service 73ffc0
# if HAVE_STRNCMP_Z13
Packit Service 73ffc0
		IFUNC_IMPL_ADD (array, i, strncmp,
Packit Service 73ffc0
				dl_hwcap & HWCAP_S390_VX, STRNCMP_Z13)
Packit Service 73ffc0
# endif
Packit Service 73ffc0
# if HAVE_STRNCMP_C
Packit Service 73ffc0
		IFUNC_IMPL_ADD (array, i, strncmp, 1, STRNCMP_C)
Packit Service 73ffc0
# endif
Packit Service 73ffc0
		)
Packit Service 73ffc0
#endif /* HAVE_STRNCMP_IFUNC  */
Packit Service 73ffc0
Packit Service f904ac
#if HAVE_STRCHR_IFUNC
Packit Service f904ac
    IFUNC_IMPL (i, name, strchr,
Packit Service f904ac
# if HAVE_STRCHR_Z13
Packit Service f904ac
		IFUNC_IMPL_ADD (array, i, strchr,
Packit Service f904ac
				dl_hwcap & HWCAP_S390_VX, STRCHR_Z13)
Packit Service f904ac
# endif
Packit Service f904ac
# if HAVE_STRCHR_C
Packit Service f904ac
		IFUNC_IMPL_ADD (array, i, strchr, 1, STRCHR_C)
Packit Service f904ac
# endif
Packit Service f904ac
		)
Packit Service f904ac
#endif /* HAVE_STRCHR_IFUNC  */
Packit Service f904ac
Packit Service 58c34d
#if HAVE_STRCHRNUL_IFUNC
Packit Service 58c34d
    IFUNC_IMPL (i, name, strchrnul,
Packit Service 58c34d
# if HAVE_STRCHRNUL_Z13
Packit Service 58c34d
		IFUNC_IMPL_ADD (array, i, strchrnul,
Packit Service 58c34d
				dl_hwcap & HWCAP_S390_VX, STRCHRNUL_Z13)
Packit Service 58c34d
# endif
Packit Service 58c34d
# if HAVE_STRCHRNUL_C
Packit Service 58c34d
		IFUNC_IMPL_ADD (array, i, strchrnul, 1, STRCHRNUL_C)
Packit Service 58c34d
# endif
Packit Service 58c34d
		)
Packit Service 58c34d
#endif /* HAVE_STRCHRNUL_IFUNC  */
Packit Service 58c34d
Packit Service 1de18b
#if HAVE_STRRCHR_IFUNC
Packit Service 1de18b
    IFUNC_IMPL (i, name, strrchr,
Packit Service 1de18b
# if HAVE_STRRCHR_Z13
Packit Service 1de18b
		IFUNC_IMPL_ADD (array, i, strrchr,
Packit Service 1de18b
				dl_hwcap & HWCAP_S390_VX, STRRCHR_Z13)
Packit Service 1de18b
# endif
Packit Service 1de18b
# if HAVE_STRRCHR_C
Packit Service 1de18b
		IFUNC_IMPL_ADD (array, i, strrchr, 1, STRRCHR_C)
Packit Service 1de18b
# endif
Packit Service 1de18b
		)
Packit Service 1de18b
#endif /* HAVE_STRRCHR_IFUNC  */
Packit Service 1de18b
Packit Service ffdfae
#if HAVE_STRSPN_IFUNC
Packit Service ffdfae
    IFUNC_IMPL (i, name, strspn,
Packit Service ffdfae
# if HAVE_STRSPN_Z13
Packit Service ffdfae
		IFUNC_IMPL_ADD (array, i, strspn,
Packit Service ffdfae
				dl_hwcap & HWCAP_S390_VX, STRSPN_Z13)
Packit Service ffdfae
# endif
Packit Service ffdfae
# if HAVE_STRSPN_C
Packit Service ffdfae
		IFUNC_IMPL_ADD (array, i, strspn, 1, STRSPN_C)
Packit Service ffdfae
# endif
Packit Service ffdfae
		)
Packit Service ffdfae
#endif /* HAVE_STRSPN_IFUNC  */
Packit Service ffdfae
Packit Service b1cbc0
#if HAVE_STRPBRK_IFUNC
Packit Service b1cbc0
    IFUNC_IMPL (i, name, strpbrk,
Packit Service b1cbc0
# if HAVE_STRPBRK_Z13
Packit Service b1cbc0
		IFUNC_IMPL_ADD (array, i, strpbrk,
Packit Service b1cbc0
				dl_hwcap & HWCAP_S390_VX, STRPBRK_Z13)
Packit Service b1cbc0
# endif
Packit Service b1cbc0
# if HAVE_STRPBRK_C
Packit Service b1cbc0
		IFUNC_IMPL_ADD (array, i, strpbrk, 1, STRPBRK_C)
Packit Service b1cbc0
# endif
Packit Service b1cbc0
		)
Packit Service b1cbc0
#endif /* HAVE_STRPBRK_IFUNC  */
Packit Service b1cbc0
Packit Service 67e387
#if HAVE_STRCSPN_IFUNC
Packit Service 67e387
    IFUNC_IMPL (i, name, strcspn,
Packit Service 67e387
# if HAVE_STRCSPN_Z13
Packit Service 67e387
		IFUNC_IMPL_ADD (array, i, strcspn,
Packit Service 67e387
				dl_hwcap & HWCAP_S390_VX, STRCSPN_Z13)
Packit Service 67e387
# endif
Packit Service 67e387
# if HAVE_STRCSPN_C
Packit Service 67e387
		IFUNC_IMPL_ADD (array, i, strcspn, 1, STRCSPN_C)
Packit Service 67e387
# endif
Packit Service 67e387
		)
Packit Service 67e387
#endif /* HAVE_STRCSPN_IFUNC  */
Packit Service 67e387
Packit Service 215f27
#if HAVE_MEMCHR_IFUNC
Packit Service 215f27
    IFUNC_IMPL (i, name, memchr,
Packit Service 215f27
# if HAVE_MEMCHR_Z13
Packit Service 215f27
		IFUNC_IMPL_ADD (array, i, memchr,
Packit Service 215f27
				dl_hwcap & HWCAP_S390_VX, MEMCHR_Z13)
Packit Service 215f27
# endif
Packit Service 215f27
# if HAVE_MEMCHR_Z900_G5
Packit Service 215f27
		IFUNC_IMPL_ADD (array, i, memchr, 1, MEMCHR_Z900_G5)
Packit Service 215f27
# endif
Packit Service 215f27
		)
Packit Service 215f27
#endif /* HAVE_MEMCHR_IFUNC  */
Packit Service 215f27
Packit Service 3b0880
#ifdef HAVE_S390_VX_ASM_SUPPORT
Packit Service 3b0880
Packit Service 3b0880
# define IFUNC_VX_IMPL(FUNC)						\
Packit Service 3b0880
  IFUNC_IMPL (i, name, FUNC,						\
Packit Service 3b0880
	      IFUNC_IMPL_ADD (array, i, FUNC, dl_hwcap & HWCAP_S390_VX, \
Packit Service 3b0880
			      __##FUNC##_vx)				\
Packit Service 3b0880
	      IFUNC_IMPL_ADD (array, i, FUNC, 1, __##FUNC##_c))
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcslen);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcsnlen);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcscpy);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcpcpy);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcsncpy);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcpncpy);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcscat);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcsncat);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcscmp);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcsncmp);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcschr);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcschrnul);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcsrchr);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcsspn);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcspbrk);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wcscspn);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wmemchr);
Packit Service 3b0880
  IFUNC_VX_IMPL (rawmemchr);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (memccpy);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wmemset);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (wmemcmp);
Packit Service 3b0880
Packit Service 3b0880
  IFUNC_VX_IMPL (memrchr);
Packit Service 3b0880
Packit Service 3b0880
#endif /* HAVE_S390_VX_ASM_SUPPORT */
Packit 6c4009
Packit 6c4009
  return i;
Packit 6c4009
}