mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
PowerPC: multiarch strcasecmp for PowerPC32
This commit is contained in:
parent
a19e01a355
commit
4dfd5c8647
15
ChangeLog
15
ChangeLog
@ -1,3 +1,18 @@
|
||||
2013-12-06 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp-power7.S: New
|
||||
file.
|
||||
* sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c: New file:
|
||||
multiarch strncasecmp for PPC32.
|
||||
* sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l-power7.S:
|
||||
New file.
|
||||
* sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c: New file:
|
||||
multiarch strcasecmp_l for PPC32.
|
||||
* sysdeps/powerpc/powerpc32/power4/multiarch/Makefile: Added strcasecmp
|
||||
multiarch objects.
|
||||
* sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list
|
||||
(__libc_ifunc_impl_list): Likewise.
|
||||
|
||||
2013-12-06 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-power7.S: New
|
||||
|
@ -5,5 +5,6 @@ sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \
|
||||
bzero-ppc32 mempcpy-power7 mempcpy-ppc32 memchr-power7 \
|
||||
memchr-ppc32 memrchr-power7 memrchr-ppc32 rawmemchr-power7 \
|
||||
rawmemchr-ppc32 strlen-power7 strlen-ppc32 strnlen-power7 \
|
||||
strnlen-ppc32 strncmp-power7 strncmp-ppc32
|
||||
strnlen-ppc32 strncmp-power7 strncmp-ppc32 \
|
||||
strcasecmp-power7 strcasecmp_l-power7
|
||||
endif
|
||||
|
@ -135,5 +135,20 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||||
IFUNC_IMPL_ADD (array, i, rawmemchr, 1,
|
||||
__rawmemchr_ppc))
|
||||
|
||||
/* Support sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c. */
|
||||
IFUNC_IMPL (i, name, strcasecmp,
|
||||
IFUNC_IMPL_ADD (array, i, strcasecmp,
|
||||
hwcap & PPC_FEATURE_HAS_VSX,
|
||||
__strcasecmp_power7)
|
||||
IFUNC_IMPL_ADD (array, i, strcasecmp, 1, __strcasecmp_ppc))
|
||||
|
||||
/* Support sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c. */
|
||||
IFUNC_IMPL (i, name, strcasecmp_l,
|
||||
IFUNC_IMPL_ADD (array, i, strcasecmp_l,
|
||||
hwcap & PPC_FEATURE_HAS_VSX,
|
||||
__strcasecmp_l_power7)
|
||||
IFUNC_IMPL_ADD (array, i, strcasecmp_l, 1,
|
||||
__strcasecmp_l_ppc))
|
||||
|
||||
return i;
|
||||
}
|
||||
|
@ -0,0 +1,39 @@
|
||||
/* Optimized strcasecmp implementation for PowerPC32.
|
||||
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#undef ENTRY
|
||||
#define ENTRY(name) \
|
||||
.globl C_SYMBOL_NAME(__strcasecmp_power7); \
|
||||
.type C_SYMBOL_NAME(__strcasecmp_power7),@function; \
|
||||
C_LABEL(__strcasecmp_power7) \
|
||||
cfi_startproc;
|
||||
|
||||
#undef END
|
||||
#define END(name) \
|
||||
cfi_endproc; \
|
||||
ASM_SIZE_DIRECTIVE(__strcasecmp_power7)
|
||||
|
||||
#undef weak_alias(name, alias)
|
||||
#define weak_alias(name, alias)
|
||||
|
||||
#undef libc_hidden_builtin_def
|
||||
#define libc_hidden_builtin_def(name)
|
||||
|
||||
#include <sysdeps/powerpc/powerpc32/power7/strcasecmp.S>
|
41
sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c
Normal file
41
sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c
Normal file
@ -0,0 +1,41 @@
|
||||
/* Multiple versions of strcasecmp.
|
||||
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef NOT_IN_libc
|
||||
# include <string.h>
|
||||
# define strcasecmp __strcasecmp_ppc
|
||||
|
||||
extern __typeof (__strcasecmp) __strcasecmp_ppc attribute_hidden;
|
||||
extern __typeof (__strcasecmp) __strcasecmp_power7 attribute_hidden;
|
||||
#endif
|
||||
|
||||
#include <string/strcasecmp.c>
|
||||
#undef strcasecmp
|
||||
|
||||
#ifndef NOT_IN_libc
|
||||
# include <shlib-compat.h>
|
||||
# include "init-arch.h"
|
||||
|
||||
extern __typeof (__strcasecmp) __libc_strcasecmp;
|
||||
libc_ifunc (__libc_strcasecmp,
|
||||
(hwcap & PPC_FEATURE_HAS_VSX)
|
||||
? __strcasecmp_power7
|
||||
: __strcasecmp_ppc);
|
||||
|
||||
weak_alias (__libc_strcasecmp, strcasecmp)
|
||||
#endif
|
@ -0,0 +1,41 @@
|
||||
/* Default strcasecmp implementation for PowerPC32.
|
||||
Copyright (C) 2011-2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#undef ENTRY
|
||||
#define ENTRY(name) \
|
||||
.globl C_SYMBOL_NAME(__strcasecmp_l_power7); \
|
||||
.type C_SYMBOL_NAME(__strcasecmp_l_power7),@function; \
|
||||
C_LABEL(__strcasecmp_l_power7) \
|
||||
cfi_startproc;
|
||||
|
||||
#undef END
|
||||
#define END(name) \
|
||||
cfi_endproc; \
|
||||
ASM_SIZE_DIRECTIVE(__strcasecmp_l_power7)
|
||||
|
||||
#undef weak_alias(name, alias)
|
||||
#define weak_alias(name, alias)
|
||||
|
||||
#undef libc_hidden_builtin_def
|
||||
#define libc_hidden_builtin_def(name)
|
||||
|
||||
#define USE_IN_EXTENDED_LOCALE_MODEL
|
||||
|
||||
#include <sysdeps/powerpc/powerpc32/power7/strcasecmp.S>
|
41
sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c
Normal file
41
sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c
Normal file
@ -0,0 +1,41 @@
|
||||
/* Multiple versions of strcasecmp.
|
||||
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef NOT_IN_libc
|
||||
# include <string.h>
|
||||
# define strcasecmp_l __strcasecmp_l_ppc
|
||||
|
||||
extern __typeof (__strcasecmp_l) __strcasecmp_l_ppc attribute_hidden;
|
||||
extern __typeof (__strcasecmp_l) __strcasecmp_l_power7 attribute_hidden;
|
||||
#endif
|
||||
|
||||
#include <string/strcasecmp_l.c>
|
||||
#undef strcasecmp_l
|
||||
|
||||
#ifndef NOT_IN_libc
|
||||
# include <shlib-compat.h>
|
||||
# include "init-arch.h"
|
||||
|
||||
extern __typeof (__strcasecmp_l) __libc_strcasecmp_l;
|
||||
libc_ifunc (__libc_strcasecmp_l,
|
||||
(hwcap & PPC_FEATURE_HAS_VSX)
|
||||
? __strcasecmp_l_power7
|
||||
: __strcasecmp_l_ppc);
|
||||
|
||||
weak_alias (__libc_strcasecmp_l, strcasecmp_l)
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user