|
|
147e83 |
From 62edac04130e7d91b0d4872376bdaa976065fd25 Mon Sep 17 00:00:00 2001
|
|
|
147e83 |
From: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
|
|
|
147e83 |
Date: Wed, 30 Jul 2014 07:40:10 -0500
|
|
|
147e83 |
Subject: [PATCH] PowerPC: multiarch wcsrchr for PowerPC64
|
|
|
147e83 |
|
|
|
147e83 |
commit 7b714620a7146104aaf863ba1dbe386beedbcc0a
|
|
|
147e83 |
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
|
|
147e83 |
Date: Fri Dec 13 14:52:48 2013 -0500
|
|
|
147e83 |
|
|
|
147e83 |
Added the following files apart from original commit.
|
|
|
147e83 |
sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c
|
|
|
147e83 |
sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c
|
|
|
147e83 |
sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c
|
|
|
147e83 |
sysdeps/powerpc/powerpc64/power6/wcsrchr.c
|
|
|
147e83 |
wcsmbs/wcsrchr.c
|
|
|
147e83 |
---
|
|
|
147e83 |
sysdeps/powerpc/power6/wcsrchr.c | 89 ++++++++++++++++++++++
|
|
|
147e83 |
.../powerpc32/power4/multiarch/wcsrchr-power6.c | 20 +++++
|
|
|
147e83 |
.../powerpc32/power4/multiarch/wcsrchr-power7.c | 20 +++++
|
|
|
147e83 |
.../powerpc32/power4/multiarch/wcsrchr-ppc32.c | 26 +++++++
|
|
|
147e83 |
sysdeps/powerpc/powerpc64/multiarch/Makefile | 5 +-
|
|
|
147e83 |
.../powerpc/powerpc64/multiarch/ifunc-impl-list.c | 11 +++
|
|
|
147e83 |
.../powerpc/powerpc64/multiarch/wcsrchr-power6.c | 19 +++++
|
|
|
147e83 |
.../powerpc/powerpc64/multiarch/wcsrchr-power7.c | 19 +++++
|
|
|
147e83 |
.../powerpc/powerpc64/multiarch/wcsrchr-ppc64.c | 18 +++++
|
|
|
147e83 |
sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c | 36 +++++++++
|
|
|
147e83 |
sysdeps/powerpc/powerpc64/power6/wcsrchr.c | 2 +-
|
|
|
147e83 |
wcsmbs/wcsrchr.c | 5 +-
|
|
|
147e83 |
12 files changed, 267 insertions(+), 3 deletions(-)
|
|
|
147e83 |
create mode 100644 sysdeps/powerpc/power6/wcsrchr.c
|
|
|
147e83 |
create mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c
|
|
|
147e83 |
create mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c
|
|
|
147e83 |
create mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c
|
|
|
147e83 |
create mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power6.c
|
|
|
147e83 |
create mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power7.c
|
|
|
147e83 |
create mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcsrchr-ppc64.c
|
|
|
147e83 |
create mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c
|
|
|
147e83 |
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/sysdeps/powerpc/power6/wcsrchr.c glibc-2.17-c758a686/sysdeps/powerpc/power6/wcsrchr.c
|
|
|
147e83 |
new file mode 100644
|
|
|
147e83 |
index 0000000..278d98d
|
|
|
147e83 |
--- /dev/null
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/power6/wcsrchr.c
|
|
|
147e83 |
@@ -0,0 +1,89 @@
|
|
|
147e83 |
+/* wcsrchr.c - Wide Character Reverse Search for POWER6+.
|
|
|
147e83 |
+ Copyright (C) 2012-2014 Free Software Foundation, Inc.
|
|
|
147e83 |
+ This file is part of the GNU C Library.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
147e83 |
+ modify it under the terms of the GNU Lesser General Public
|
|
|
147e83 |
+ License as published by the Free Software Foundation; either
|
|
|
147e83 |
+ version 2.1 of the License, or (at your option) any later version.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
147e83 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
147e83 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
147e83 |
+ Lesser General Public License for more details.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ You should have received a copy of the GNU Lesser General Public
|
|
|
147e83 |
+ License along with the GNU C Library; see the file COPYING.LIB. If
|
|
|
147e83 |
+ not, see <http://www.gnu.org/licenses/>. */
|
|
|
147e83 |
+
|
|
|
147e83 |
+#include <wchar.h>
|
|
|
147e83 |
+
|
|
|
147e83 |
+#ifndef WCSRCHR
|
|
|
147e83 |
+# define WCSRCHR wcsrchr
|
|
|
147e83 |
+#endif
|
|
|
147e83 |
+
|
|
|
147e83 |
+/* Find the last occurrence of WC in WCS. */
|
|
|
147e83 |
+wchar_t *
|
|
|
147e83 |
+WCSRCHR (const wchar_t *wcs, const wchar_t wc)
|
|
|
147e83 |
+{
|
|
|
147e83 |
+ const wchar_t *wcs2 = wcs + 1;
|
|
|
147e83 |
+ const wchar_t *retval = NULL;
|
|
|
147e83 |
+
|
|
|
147e83 |
+ if (*wcs == wc)
|
|
|
147e83 |
+ retval = wcs;
|
|
|
147e83 |
+
|
|
|
147e83 |
+ if (*wcs == L'\0') return (wchar_t *) retval;
|
|
|
147e83 |
+
|
|
|
147e83 |
+ do
|
|
|
147e83 |
+ {
|
|
|
147e83 |
+ wcs+=2;
|
|
|
147e83 |
+
|
|
|
147e83 |
+ if (*wcs2 == wc)
|
|
|
147e83 |
+ retval = wcs2;
|
|
|
147e83 |
+ if (*wcs2 == L'\0')
|
|
|
147e83 |
+ return (wchar_t *) retval;
|
|
|
147e83 |
+ wcs2+=2;
|
|
|
147e83 |
+
|
|
|
147e83 |
+ if (*wcs == wc)
|
|
|
147e83 |
+ retval = wcs;
|
|
|
147e83 |
+ if (*wcs == L'\0')
|
|
|
147e83 |
+ return (wchar_t *) retval;
|
|
|
147e83 |
+ wcs+=2;
|
|
|
147e83 |
+
|
|
|
147e83 |
+ if (*wcs2 == wc)
|
|
|
147e83 |
+ retval = wcs2;
|
|
|
147e83 |
+ if (*wcs2 == L'\0')
|
|
|
147e83 |
+ return (wchar_t *) retval;
|
|
|
147e83 |
+ wcs2+=2;
|
|
|
147e83 |
+
|
|
|
147e83 |
+ if (*wcs == wc)
|
|
|
147e83 |
+ retval = wcs;
|
|
|
147e83 |
+ if (*wcs == L'\0')
|
|
|
147e83 |
+ return (wchar_t *) retval;
|
|
|
147e83 |
+ wcs+=2;
|
|
|
147e83 |
+
|
|
|
147e83 |
+ if (*wcs2 == wc)
|
|
|
147e83 |
+ retval = wcs2;
|
|
|
147e83 |
+ if (*wcs2 == L'\0')
|
|
|
147e83 |
+ return (wchar_t *) retval;
|
|
|
147e83 |
+ wcs2+=2;
|
|
|
147e83 |
+
|
|
|
147e83 |
+ if (*wcs == wc)
|
|
|
147e83 |
+ retval = wcs;
|
|
|
147e83 |
+ if (*wcs == L'\0')
|
|
|
147e83 |
+ return (wchar_t *) retval;
|
|
|
147e83 |
+ wcs+=2;
|
|
|
147e83 |
+
|
|
|
147e83 |
+ if (*wcs2 == wc)
|
|
|
147e83 |
+ retval = wcs2;
|
|
|
147e83 |
+ if (*wcs2 == L'\0')
|
|
|
147e83 |
+ return (wchar_t *) retval;
|
|
|
147e83 |
+ wcs2+=2;
|
|
|
147e83 |
+
|
|
|
147e83 |
+ if (*wcs == wc)
|
|
|
147e83 |
+ retval = wcs;
|
|
|
147e83 |
+ }
|
|
|
147e83 |
+ while (*wcs != L'\0');
|
|
|
147e83 |
+
|
|
|
147e83 |
+ return (wchar_t *) retval;
|
|
|
147e83 |
+}
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c
|
|
|
147e83 |
new file mode 100644
|
|
|
147e83 |
index 0000000..bd77eb3
|
|
|
147e83 |
--- /dev/null
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c
|
|
|
147e83 |
@@ -0,0 +1,20 @@
|
|
|
147e83 |
+/* Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
|
|
147e83 |
+ This file is part of the GNU C Library.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
147e83 |
+ modify it under the terms of the GNU Lesser General Public
|
|
|
147e83 |
+ License as published by the Free Software Foundation; either
|
|
|
147e83 |
+ version 2.1 of the License, or (at your option) any later version.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
147e83 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
147e83 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
147e83 |
+ Lesser General Public License for more details.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ You should have received a copy of the GNU Lesser General Public
|
|
|
147e83 |
+ License along with the GNU C Library; if not, see
|
|
|
147e83 |
+ <http://www.gnu.org/licenses/>. */
|
|
|
147e83 |
+
|
|
|
147e83 |
+#define WCSRCHR __wcsrchr_power6
|
|
|
147e83 |
+
|
|
|
147e83 |
+#include <sysdeps/powerpc/power6/wcsrchr.c>
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c
|
|
|
147e83 |
new file mode 100644
|
|
|
147e83 |
index 0000000..829a434
|
|
|
147e83 |
--- /dev/null
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c
|
|
|
147e83 |
@@ -0,0 +1,20 @@
|
|
|
147e83 |
+/* Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
|
|
147e83 |
+ This file is part of the GNU C Library.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
147e83 |
+ modify it under the terms of the GNU Lesser General Public
|
|
|
147e83 |
+ License as published by the Free Software Foundation; either
|
|
|
147e83 |
+ version 2.1 of the License, or (at your option) any later version.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
147e83 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
147e83 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
147e83 |
+ Lesser General Public License for more details.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ You should have received a copy of the GNU Lesser General Public
|
|
|
147e83 |
+ License along with the GNU C Library; if not, see
|
|
|
147e83 |
+ <http://www.gnu.org/licenses/>. */
|
|
|
147e83 |
+
|
|
|
147e83 |
+#define WCSRCHR __wcsrchr_power7
|
|
|
147e83 |
+
|
|
|
147e83 |
+#include <sysdeps/powerpc/power6/wcsrchr.c>
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c
|
|
|
147e83 |
new file mode 100644
|
|
|
147e83 |
index 0000000..9c7fe2d
|
|
|
147e83 |
--- /dev/null
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c
|
|
|
147e83 |
@@ -0,0 +1,26 @@
|
|
|
147e83 |
+/* Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
|
|
147e83 |
+ This file is part of the GNU C Library.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
147e83 |
+ modify it under the terms of the GNU Lesser General Public
|
|
|
147e83 |
+ License as published by the Free Software Foundation; either
|
|
|
147e83 |
+ version 2.1 of the License, or (at your option) any later version.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
147e83 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
147e83 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
147e83 |
+ Lesser General Public License for more details.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ You should have received a copy of the GNU Lesser General Public
|
|
|
147e83 |
+ License along with the GNU C Library; if not, see
|
|
|
147e83 |
+ <http://www.gnu.org/licenses/>. */
|
|
|
147e83 |
+
|
|
|
147e83 |
+#include <wchar.h>
|
|
|
147e83 |
+
|
|
|
147e83 |
+#ifndef NOT_IN_libc
|
|
|
147e83 |
+# define WCSRCHR __wcsrchr_ppc
|
|
|
147e83 |
+#endif
|
|
|
147e83 |
+
|
|
|
147e83 |
+extern __typeof (wcsrchr) __wcsrchr_ppc;
|
|
|
147e83 |
+
|
|
|
147e83 |
+#include <wcsmbs/wcsrchr.c>
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/Makefile glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/Makefile
|
|
|
147e83 |
index ff3b8cf..b4504b7 100644
|
|
|
147e83 |
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/Makefile
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/Makefile
|
|
|
147e83 |
@@ -10,10 +10,13 @@ sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \
|
|
|
147e83 |
strncase-power7 strncase_l-power7 strncmp-power7 \
|
|
|
147e83 |
strncmp-power4 strncmp-ppc64 strchr-power7 strchr-ppc64 \
|
|
|
147e83 |
strchrnul-power7 strchrnul-ppc64 wcschr-power7 \
|
|
|
147e83 |
- wcschr-power6 wcschr-ppc64
|
|
|
147e83 |
+ wcschr-power6 wcschr-ppc64 wcsrchr-power7 wcsrchr-power6 \
|
|
|
147e83 |
+ wcsrchr-ppc64
|
|
|
147e83 |
|
|
|
147e83 |
CFLAGS-strncase-power7.c += -mcpu=power7 -funroll-loops
|
|
|
147e83 |
CFLAGS-strncase_l-power7.c += -mcpu=power7 -funroll-loops
|
|
|
147e83 |
CFLAGS-wcschr-power7.c += -mcpu=power7
|
|
|
147e83 |
CFLAGS-wcschr-power6.c += -mcpu=power6
|
|
|
147e83 |
+CFLAGS-wcsrchr-power7.c += -mcpu=power7
|
|
|
147e83 |
+CFLAGS-wcsrchr-power6.c += -mcpu=power6
|
|
|
147e83 |
endif
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
|
|
|
147e83 |
index cc932c9..6c7422c 100644
|
|
|
147e83 |
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
|
|
|
147e83 |
@@ -202,5 +202,16 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
|
|
147e83 |
IFUNC_IMPL_ADD (array, i, wcschr, 1,
|
|
|
147e83 |
__wcschr_ppc))
|
|
|
147e83 |
|
|
|
147e83 |
+ /* Support sysdeps/powerpc/powerpc64/multiarch/wcschr.c. */
|
|
|
147e83 |
+ IFUNC_IMPL (i, name, wcsrchr,
|
|
|
147e83 |
+ IFUNC_IMPL_ADD (array, i, wcsrchr,
|
|
|
147e83 |
+ hwcap & PPC_FEATURE_HAS_VSX,
|
|
|
147e83 |
+ __wcsrchr_power7)
|
|
|
147e83 |
+ IFUNC_IMPL_ADD (array, i, wcsrchr,
|
|
|
147e83 |
+ hwcap & PPC_FEATURE_ARCH_2_05,
|
|
|
147e83 |
+ __wcsrchr_power6)
|
|
|
147e83 |
+ IFUNC_IMPL_ADD (array, i, wcsrchr, 1,
|
|
|
147e83 |
+ __wcsrchr_ppc))
|
|
|
147e83 |
+
|
|
|
147e83 |
return i;
|
|
|
147e83 |
}
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power6.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power6.c
|
|
|
147e83 |
new file mode 100644
|
|
|
147e83 |
index 0000000..da6f27b
|
|
|
147e83 |
--- /dev/null
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power6.c
|
|
|
147e83 |
@@ -0,0 +1,19 @@
|
|
|
147e83 |
+/* wcsrchr.c - Wide Character Search for powerpc64/power6.
|
|
|
147e83 |
+ Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
|
|
147e83 |
+ This file is part of the GNU C Library.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
147e83 |
+ modify it under the terms of the GNU Lesser General Public
|
|
|
147e83 |
+ License as published by the Free Software Foundation; either
|
|
|
147e83 |
+ version 2.1 of the License, or (at your option) any later version.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
147e83 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
147e83 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
147e83 |
+ Lesser General Public License for more details.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ You should have received a copy of the GNU Lesser General Public
|
|
|
147e83 |
+ License along with the GNU C Library; see the file COPYING.LIB. If
|
|
|
147e83 |
+ not, see <http://www.gnu.org/licenses/>. */
|
|
|
147e83 |
+
|
|
|
147e83 |
+#include <sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c>
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power7.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power7.c
|
|
|
147e83 |
new file mode 100644
|
|
|
147e83 |
index 0000000..60f07a8
|
|
|
147e83 |
--- /dev/null
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power7.c
|
|
|
147e83 |
@@ -0,0 +1,19 @@
|
|
|
147e83 |
+/* wcsrchr.c - Wide Character Search for powerpc64/power7.
|
|
|
147e83 |
+ Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
|
|
147e83 |
+ This file is part of the GNU C Library.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
147e83 |
+ modify it under the terms of the GNU Lesser General Public
|
|
|
147e83 |
+ License as published by the Free Software Foundation; either
|
|
|
147e83 |
+ version 2.1 of the License, or (at your option) any later version.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
147e83 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
147e83 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
147e83 |
+ Lesser General Public License for more details.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ You should have received a copy of the GNU Lesser General Public
|
|
|
147e83 |
+ License along with the GNU C Library; see the file COPYING.LIB. If
|
|
|
147e83 |
+ not, see <http://www.gnu.org/licenses/>. */
|
|
|
147e83 |
+
|
|
|
147e83 |
+#include <sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c>
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-ppc64.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-ppc64.c
|
|
|
147e83 |
new file mode 100644
|
|
|
147e83 |
index 0000000..1fff510
|
|
|
147e83 |
--- /dev/null
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-ppc64.c
|
|
|
147e83 |
@@ -0,0 +1,18 @@
|
|
|
147e83 |
+/* Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
|
|
147e83 |
+ This file is part of the GNU C Library.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
147e83 |
+ modify it under the terms of the GNU Lesser General Public
|
|
|
147e83 |
+ License as published by the Free Software Foundation; either
|
|
|
147e83 |
+ version 2.1 of the License, or (at your option) any later version.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
147e83 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
147e83 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
147e83 |
+ Lesser General Public License for more details.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ You should have received a copy of the GNU Lesser General Public
|
|
|
147e83 |
+ License along with the GNU C Library; if not, see
|
|
|
147e83 |
+ <http://www.gnu.org/licenses/>. */
|
|
|
147e83 |
+
|
|
|
147e83 |
+#include <sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c>
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c
|
|
|
147e83 |
new file mode 100644
|
|
|
147e83 |
index 0000000..3d0ab42
|
|
|
147e83 |
--- /dev/null
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c
|
|
|
147e83 |
@@ -0,0 +1,36 @@
|
|
|
147e83 |
+/* Multiple versions of wcsrchr.
|
|
|
147e83 |
+ Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
|
|
147e83 |
+ This file is part of the GNU C Library.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
147e83 |
+ modify it under the terms of the GNU Lesser General Public
|
|
|
147e83 |
+ License as published by the Free Software Foundation; either
|
|
|
147e83 |
+ version 2.1 of the License, or (at your option) any later version.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
147e83 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
147e83 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
147e83 |
+ Lesser General Public License for more details.
|
|
|
147e83 |
+
|
|
|
147e83 |
+ You should have received a copy of the GNU Lesser General Public
|
|
|
147e83 |
+ License along with the GNU C Library; if not, see
|
|
|
147e83 |
+ <http://www.gnu.org/licenses/>. */
|
|
|
147e83 |
+
|
|
|
147e83 |
+#ifndef NOT_IN_libc
|
|
|
147e83 |
+# include <wchar.h>
|
|
|
147e83 |
+# include <shlib-compat.h>
|
|
|
147e83 |
+# include "init-arch.h"
|
|
|
147e83 |
+
|
|
|
147e83 |
+extern __typeof (wcsrchr) __wcsrchr_ppc attribute_hidden;
|
|
|
147e83 |
+extern __typeof (wcsrchr) __wcsrchr_power6 attribute_hidden;
|
|
|
147e83 |
+extern __typeof (wcsrchr) __wcsrchr_power7 attribute_hidden;
|
|
|
147e83 |
+
|
|
|
147e83 |
+libc_ifunc (wcsrchr,
|
|
|
147e83 |
+ (hwcap & PPC_FEATURE_HAS_VSX)
|
|
|
147e83 |
+ ? __wcsrchr_power7 :
|
|
|
147e83 |
+ (hwcap & PPC_FEATURE_ARCH_2_05)
|
|
|
147e83 |
+ ? __wcsrchr_power6
|
|
|
147e83 |
+ : __wcsrchr_ppc);
|
|
|
147e83 |
+#else
|
|
|
147e83 |
+#include <wcsmbs/wcsrchr.c>
|
|
|
147e83 |
+#endif
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power6/wcsrchr.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power6/wcsrchr.c
|
|
|
147e83 |
index 2327c05..b86472d 100644
|
|
|
147e83 |
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power6/wcsrchr.c
|
|
|
147e83 |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power6/wcsrchr.c
|
|
|
147e83 |
@@ -1 +1 @@
|
|
|
147e83 |
-#include "../../powerpc32/power6/wcsrchr.c"
|
|
|
147e83 |
+#include <sysdeps/powerpc/power6/wcsrchr.c>
|
|
|
147e83 |
diff --git glibc-2.17-c758a686/wcsmbs/wcsrchr.c glibc-2.17-c758a686/wcsmbs/wcsrchr.c
|
|
|
147e83 |
index c1b5a59..27c94c5 100644
|
|
|
147e83 |
--- glibc-2.17-c758a686/wcsmbs/wcsrchr.c
|
|
|
147e83 |
+++ glibc-2.17-c758a686/wcsmbs/wcsrchr.c
|
|
|
147e83 |
@@ -18,10 +18,13 @@
|
|
|
147e83 |
|
|
|
147e83 |
#include <wchar.h>
|
|
|
147e83 |
|
|
|
147e83 |
+#ifndef WCSRCHR
|
|
|
147e83 |
+# define WCSRCHR wcsrchr
|
|
|
147e83 |
+#endif
|
|
|
147e83 |
|
|
|
147e83 |
/* Find the last occurrence of WC in WCS. */
|
|
|
147e83 |
wchar_t *
|
|
|
147e83 |
-wcsrchr (wcs, wc)
|
|
|
147e83 |
+WCSRCHR (wcs, wc)
|
|
|
147e83 |
register const wchar_t *wcs;
|
|
|
147e83 |
register const wchar_t wc;
|
|
|
147e83 |
{
|
|
|
147e83 |
--
|
|
|
147e83 |
1.8.3.1
|
|
|
147e83 |
|