PowerPC: optimized strcspn for PPC64/POWER7
commitc0afc58657f482f4c31ccade06e7b059e761186c
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Thu, 20 Mar 2014 16:24:52 +0000 (20 11:24 -0500)
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Fri, 21 Mar 2014 12:16:49 +0000 (21 07:16 -0500)
treef9e2b39cd3fec55e0bc4164d08e08678def06989
parentac6d8452be2d582e4a2b14525c839c71b9351991
PowerPC: optimized strcspn for PPC64/POWER7

This patch add a optimized strcspn for POWER7 by using a different
algorithm than default implementation: it constructs a table based on
the 'accept' argument and use this table to check for any occurance
on the input string. The idea is similar as x86_64 uses.
For PowerPC some tunings were added, such as unroll loops and align
stack memory to table to 16 bytes (so VSX clean can ran without
alignment issues).

Backport of 6eaf95cbfa0031ea267682dc2c9c17ed3e3dc167
ChangeLog
string/strcspn.c
sysdeps/powerpc/powerpc64/multiarch/Makefile
sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
sysdeps/powerpc/powerpc64/multiarch/strcspn-power7.S [copied from string/strcspn.c with 53% similarity]
sysdeps/powerpc/powerpc64/multiarch/strcspn-ppc64.c [new file with mode: 0644]
sysdeps/powerpc/powerpc64/multiarch/strcspn.c [copied from string/strcspn.c with 56% similarity]
sysdeps/powerpc/powerpc64/power7/strcspn.S [new file with mode: 0644]