Blame sysdeps/s390/memmove.c

Packit Bot 63cc2b
/* Multiple versions of memmove.
Packit Bot 63cc2b
   Copyright (C) 2016-2018 Free Software Foundation, Inc.
Packit Bot 63cc2b
   This file is part of the GNU C Library.
Packit Bot 63cc2b
Packit Bot 63cc2b
   The GNU C Library is free software; you can redistribute it and/or
Packit Bot 63cc2b
   modify it under the terms of the GNU Lesser General Public
Packit Bot 63cc2b
   License as published by the Free Software Foundation; either
Packit Bot 63cc2b
   version 2.1 of the License, or (at your option) any later version.
Packit Bot 63cc2b
Packit Bot 63cc2b
   The GNU C Library is distributed in the hope that it will be useful,
Packit Bot 63cc2b
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Bot 63cc2b
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Bot 63cc2b
   Lesser General Public License for more details.
Packit Bot 63cc2b
Packit Bot 63cc2b
   You should have received a copy of the GNU Lesser General Public
Packit Bot 63cc2b
   License along with the GNU C Library; if not, see
Packit Bot 63cc2b
   <http://www.gnu.org/licenses/>.  */
Packit Bot 63cc2b
Packit Bot 63cc2b
#include <ifunc-memcpy.h>
Packit Bot 63cc2b
Packit Bot 63cc2b
#if HAVE_MEMMOVE_IFUNC
Packit Bot 63cc2b
/* If we don't use ifunc, an alias is defined for memmove
Packit Bot 63cc2b
   in sysdeps/s390/memmove-c.c or sysdeps/s390/memcpy.S
Packit Bot 63cc2b
   depending on the used default implementation.  */
Packit Bot 63cc2b
# undef memmove
Packit Bot 63cc2b
# define memmove __redirect_memmove
Packit Bot 63cc2b
# include <string.h>
Packit Bot 63cc2b
# include <ifunc-resolve.h>
Packit Bot 63cc2b
# undef memmove
Packit Bot 63cc2b
Packit Bot 63cc2b
# if HAVE_MEMMOVE_C
Packit Bot 63cc2b
extern __typeof (__redirect_memmove) MEMMOVE_C attribute_hidden;
Packit Bot 63cc2b
# endif
Packit Bot 63cc2b
Packit Bot 63cc2b
# if HAVE_MEMMOVE_Z13
Packit Bot 63cc2b
extern __typeof (__redirect_memmove) MEMMOVE_Z13 attribute_hidden;
Packit Bot 63cc2b
# endif
Packit Bot 63cc2b
Packit Bot 63cc2b
s390_libc_ifunc_expr (__redirect_memmove, memmove,
Packit Bot 63cc2b
		      (HAVE_MEMMOVE_Z13 && (hwcap & HWCAP_S390_VX))
Packit Bot 63cc2b
		      ? MEMMOVE_Z13
Packit Bot 63cc2b
		      : MEMMOVE_DEFAULT
Packit Bot 63cc2b
		      )
Packit Bot 63cc2b
#endif