PowerPC: optimized strcspn for PPC64/POWER7
commit6eaf95cbfa0031ea267682dc2c9c17ed3e3dc167
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>
Thu, 20 Mar 2014 16:24:52 +0000 (20 11:24 -0500)
tree93cf4f0efb9ce1654e9f298b6342953a7935965a
parentae3a5dff0f4135cc57ddddf3c19ed5be80285b54
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).
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]