Blame sysdeps/s390/memmem-vx.c

Packit a5344b
/* Default memmem implementation with vector string functions for S/390.
Packit a5344b
   Copyright (C) 2018 Free Software Foundation, Inc.
Packit a5344b
   This file is part of the GNU C Library.
Packit a5344b
Packit a5344b
   The GNU C Library is free software; you can redistribute it and/or
Packit a5344b
   modify it under the terms of the GNU Lesser General Public
Packit a5344b
   License as published by the Free Software Foundation; either
Packit a5344b
   version 2.1 of the License, or (at your option) any later version.
Packit a5344b
Packit a5344b
   The GNU C Library is distributed in the hope that it will be useful,
Packit a5344b
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit a5344b
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit a5344b
   Lesser General Public License for more details.
Packit a5344b
Packit a5344b
   You should have received a copy of the GNU Lesser General Public
Packit a5344b
   License along with the GNU C Library; if not, see
Packit a5344b
   <http://www.gnu.org/licenses/>.  */
Packit a5344b
Packit a5344b
#include <ifunc-memmem.h>
Packit a5344b
Packit a5344b
#if HAVE_MEMMEM_Z13
Packit a5344b
# include <string.h>
Packit a5344b
# if HAVE_MEMMEM_IFUNC
Packit a5344b
Packit a5344b
#  ifndef _LIBC
Packit a5344b
#   define memmem MEMMEM_Z13
Packit a5344b
#  else
Packit a5344b
#   define __memmem MEMMEM_Z13
Packit a5344b
#  endif
Packit a5344b
Packit a5344b
#  if defined SHARED && IS_IN (libc)
Packit a5344b
#   undef libc_hidden_def
Packit a5344b
#   undef libc_hidden_weak
Packit a5344b
Packit a5344b
#   if HAVE_MEMMEM_C
Packit a5344b
#    define libc_hidden_def(name)
Packit a5344b
#    define libc_hidden_weak(name)
Packit a5344b
#   else
Packit a5344b
#    define libc_hidden_def(name)				\
Packit a5344b
  strong_alias (__memmem_vx, __memmem_vx_1);			\
Packit a5344b
  __hidden_ver1 (__memmem_vx, __GI___memmem, __memmem_vx);
Packit a5344b
Packit a5344b
#    define libc_hidden_weak(name)					\
Packit a5344b
  __hidden_ver1 (__memmem_vx_1, __GI_memmem, __memmem_vx_1) __attribute__((weak));
Packit a5344b
#   endif
Packit a5344b
#  endif
Packit a5344b
Packit a5344b
#  undef weak_alias
Packit a5344b
#  define weak_alias(a, b)
Packit a5344b
# endif
Packit a5344b
Packit a5344b
# ifdef USE_MULTIARCH
Packit a5344b
extern __typeof (memchr) __memchr_vx attribute_hidden;
Packit a5344b
# define memchr __memchr_vx
Packit a5344b
Packit a5344b
extern __typeof (memcmp) __memcmp_z196 attribute_hidden;
Packit a5344b
# define memcmp __memcmp_z196
Packit a5344b
# endif
Packit a5344b
Packit a5344b
# include <string/memmem.c>
Packit a5344b
#endif