summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/strtok_r.S
diff options
context:
space:
mode:
authorRajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>2014-12-01 09:03:58 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-12-01 09:03:58 -0500
commita8a7d7d212de1dd8c8d0a59eb9ea1c9289f63be1 (patch)
treebc15e7b5963c8942c3c0a605bd9ff1a13776dfbc /sysdeps/powerpc/powerpc64/strtok_r.S
parent0d560bbfcf86f619746bcc685780aa8bb03fdd93 (diff)
downloadglibc-a8a7d7d212de1dd8c8d0a59eb9ea1c9289f63be1.tar.gz
powerpc: strtok{_r} optimization for powerpc64
This patch optimizes strtok and strtok_r for POWERPC64. A table of 256 characters is created and marked based on the 'accept' argument and used to check for any occurance on the input string.Loop unrolling is also used to gain improvements.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/strtok_r.S')
-rw-r--r--sysdeps/powerpc/powerpc64/strtok_r.S24
1 files changed, 24 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/strtok_r.S b/sysdeps/powerpc/powerpc64/strtok_r.S
new file mode 100644
index 0000000000..6e5d301035
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/strtok_r.S
@@ -0,0 +1,24 @@
+/* Optimized strtok_r implementation for PowerPC64.
+ Copyright (C) 2014 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/>. */
+
+#define USE_AS_STRTOK_R
+#include <sysdeps/powerpc/powerpc64/strtok.S>
+
+weak_alias (__strtok_r, strtok_r)
+libc_hidden_def (__strtok_r)
+libc_hidden_builtin_def (strtok_r)