glibc/sysdeps
Adhemerval Zanella f2d7f23a30 Remove i686, x86_64, and powerpc strtok implementations
Based on comments on previous attempt to address BZ#16640 [1],
the idea is not support invalid use of strtok (the original
bug report proposal).  This leader to a new strtok optimized
strtok implementation [2].

The idea of this patch is to fix BZ#16640 to align all the
implementations to a same contract.  However, with newer strtok
code it is better to get remove the old assembly ones instead of
fix them.

For x86 is a gain in all cases since the new implementation can
potentially use sse2/sse42 implementation for strspn and strcspn.
This shows a better performance on both i686 and x86_64 using
the string benchtests.

On powerpc64 the gains are mixed, where only for larger inputs
or keys some gains are showns (based on benchtest it seems that
it shows some gains for keys larger than 10 and inputs larger
than 32).  I would prefer to remove the optimized implementation
based on first code simplicity and second because some more gain
could be optimized using a better optimized strcspn/strspn
code (as for x86).  However if powerpc arch maintainers prefer I
can send a v2 with the assembly code adjusted instead.

Checked on x86_64-linux-gnu, i686-linux-gnu, and powerpc64le-linux-gnu.

	[BZ #16640]
	* sysdeps/i386/i686/strtok.S: Remove file.
	* sysdeps/i386/i686/strtok_r.S: Likewise.
	* sysdeps/i386/strtok.S: Likewise.
	* sysdeps/i386/strtok_r.S: Likewise.
	* sysdeps/powerpc/powerpc64/strtok.S: Likewise.
	* sysdeps/powerpc/powerpc64/strtok_r.S: Likewise.
	* sysdeps/x86_64/strtok.S: Likewise.
	* sysdeps/x86_64/strtok_r.S: Likewise.

[1] https://sourceware.org/ml/libc-alpha/2016-10/msg00411.html
[2] https://sourceware.org/ml/libc-alpha/2016-12/msg00461.html
2017-02-06 10:24:17 -02:00
..
aarch64 New pthread rwlock that is more scalable. 2017-01-10 11:50:17 +01:00
alpha alpha: Use saturating arithmetic in memchr 2017-02-01 14:39:04 -08:00
arm Fix ARM fpu_control.h for assemblers requiring VFP insn names (bug 21047). 2017-01-19 00:05:34 +00:00
generic Drop GLIBC_TUNABLES for setxid programs when tunables is disabled (bz #21073) 2017-02-02 15:50:24 +05:30
gnu Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
hppa Remove very old libm-test-ulps entries. 2017-01-20 23:58:49 +00:00
i386 Remove i686, x86_64, and powerpc strtok implementations 2017-02-06 10:24:17 -02:00
ia64 Remove very old libm-test-ulps entries. 2017-01-20 23:58:49 +00:00
ieee754 Move wrappers to libm-compat-calls-auto 2017-01-04 16:25:04 -02:00
init_array Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
m68k m68k: fix 64bit atomic ops 2017-02-01 01:32:31 +01:00
mach Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
microblaze Remove very old libm-test-ulps entries. 2017-01-20 23:58:49 +00:00
mips New pthread rwlock that is more scalable. 2017-01-10 11:50:17 +01:00
nacl Bug 20116: Fix use after free in pthread_create() 2017-01-28 19:21:44 -05:00
nios2 New pthread rwlock that is more scalable. 2017-01-10 11:50:17 +01:00
nptl Clear list of acquired robust mutexes in the child process after forking. 2017-01-13 17:17:38 +01:00
posix Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
powerpc Remove i686, x86_64, and powerpc strtok implementations 2017-02-06 10:24:17 -02:00
pthread Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
s390 New pthread rwlock that is more scalable. 2017-01-10 11:50:17 +01:00
sh Remove very old libm-test-ulps entries. 2017-01-20 23:58:49 +00:00
sparc sparc: Remove optimized math routines which cause testsuite failures. 2017-02-03 17:55:25 -08:00
tile tile: Check for pointer add overflow in memchr 2017-01-16 15:44:48 -05:00
unix Consolidate arm and mips posix_fadvise implementations 2017-02-06 10:21:55 -02:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
x86 New pthread rwlock that is more scalable. 2017-01-10 11:50:17 +01:00
x86_64 Remove i686, x86_64, and powerpc strtok implementations 2017-02-06 10:24:17 -02:00