]> sourceware.org Git - glibc.git/commitdiff
PowerPC: multiarch strcasecmp for PowerPC32
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Mon, 14 Oct 2013 13:49:53 +0000 (08:49 -0500)
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Fri, 6 Dec 2013 11:47:01 +0000 (05:47 -0600)
ChangeLog
sysdeps/powerpc/powerpc32/power4/multiarch/Makefile
sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c
sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp-power7.S [new file with mode: 0644]
sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c [new file with mode: 0644]
sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l-power7.S [new file with mode: 0644]
sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c [new file with mode: 0644]

index eee9a95d89732e2a1d3ee4853be36248ae4df15d..03c3463b77c796db886531cb975654db95089a12 100644 (file)
--- a/ChangeLog
+++ b/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
index d82f6915af6d3a1c3bc0c521766d147555845950..3bc078f5ff73686aa39debac9f6c43cf37fae619 100644 (file)
@@ -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
index a964881900e0ceab153c3aefe629aa9fc38af03f..2d21bff5fc070d3b3e266108286e93045e3b9c78 100644 (file)
@@ -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;
 }
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp-power7.S
new file mode 100644 (file)
index 0000000..a177e62
--- /dev/null
@@ -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>
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c
new file mode 100644 (file)
index 0000000..8aef486
--- /dev/null
@@ -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
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l-power7.S
new file mode 100644 (file)
index 0000000..696d2dc
--- /dev/null
@@ -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>
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c
new file mode 100644 (file)
index 0000000..65944c6
--- /dev/null
@@ -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
This page took 0.12798 seconds and 5 git commands to generate.