Age | Commit message (Collapse) | Author |
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* sysdeps/i386/i686/strtok.S: Store pointer to NUL byte if NULL is
returned.
* sysdeps/i386/strtok.S: Likewise.
* sysdeps/x86_64/strtok.S: Likewise.
* string/Makefile (tests): Add bug-strtok1.
* string/bug-strtok1.c: New file.
|
|
equivalent, but shorter instructions.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/setcontext.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/swapcontext.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* sysdeps/x86_64/strchr.S: Likewise.
* sysdeps/x86_64/memset.S: Likewise.
* sysdeps/x86_64/strcspn.S: Likewise.
* sysdeps/x86_64/strcmp.S: Likewise.
* sysdeps/x86_64/elf/start.S: Likewise.
* sysdeps/x86_64/strspn.S: Likewise.
* sysdeps/x86_64/dl-machine.h: Likewise.
* sysdeps/x86_64/bsd-_setjmp.S: Likewise.
* sysdeps/x86_64/bsd-setjmp.S: Likewise.
* sysdeps/x86_64/strtok.S: Likewise.
|
|
|
|
|
|
2003-05-22 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/x86_64/gettimeofday.S: Add CFI
directives.
* sysdeps/unix/sysv/linux/x86_64/time.S: Likewise.
* sysdeps/x86_64/strtok.S: Likewise.
|
|
* sysdeps/x86_64/dl-machine.h (elf_machine_runtime_setup): Declare
external functions with hidden attribute.
(elf_machine_rela): Optimize.
* sysdeps/x86_64/memset.S: New file.
* sysdeps/x86_64/bzero.S: New file.
* sysdeps/x86_64/stpcpy.S: New file.
* sysdeps/x86_64/strcat.S: New file.
* sysdeps/x86_64/strchr.S: New file.
* sysdeps/x86_64/strcpy.S: New file.
* sysdeps/x86_64/strcspn.S: New file.
* sysdeps/x86_64/strlen.S: New file.
* sysdeps/x86_64/strpbrk.S: New file.
* sysdeps/x86_64/strspn.S: New file.
* sysdeps/x86_64/strcmp.S: New file.
* sysdeps/x86_64/strtok_r.S: New file.
* sysdeps/x86_64/strtok.S: New file.
* sysdeps/x86_64/memcpy.S: New file.
* sysdeps/x86_64/mempcpy.S: New file.
|