]> git.ipfire.org Git - thirdparty/glibc.git/commit
PowerPC LE strchr
authorAlan Modra <amodra@gmail.com>
Sat, 17 Aug 2013 09:16:05 +0000 (18:46 +0930)
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Fri, 15 Nov 2013 17:31:17 +0000 (11:31 -0600)
commit509b04bf435e5411bb89f95f8d4df673c3ffcf66
tree84951a8cfe3ed077a09a1dcd0a56c30a12163dbf
parentf7721c628c1d9d3c92cb4a9f7695be07a92c9293
PowerPC LE strchr
http://sourceware.org/ml/libc-alpha/2013-08/msg00101.html

Adds little-endian support to optimised strchr assembly.  I've also
tweaked the big-endian code a little.  In power7/strchr.S there's a
check in the tail of the function that we didn't match 0 before
finding a c match, done by comparing leading zero counts.  It's just
as valid, and quicker, to compare the raw output from cmpb.

Another little tweak is to use rldimi/insrdi in place of rlwimi for
the power7 strchr functions.  Since rlwimi is cracked, it is a few
cycles slower.  rldimi can be used on the 32-bit power7 functions
too.

* sysdeps/powerpc/powerpc64/power7/strchr.S (strchr): Add little-endian
support.  Correct typos, formatting.  Optimize tail.  Use insrdi
rather than rlwimi.
* sysdeps/powerpc/powerpc32/power7/strchr.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/strchrnul.S (__strchrnul): Add
little-endian support.  Correct typos.
* sysdeps/powerpc/powerpc32/power7/strchrnul.S: Likewise.  Use insrdi
rather than rlwimi.
* sysdeps/powerpc/powerpc64/strchr.S (rTMP4, rTMP5): Define.  Use
in loop and entry code to keep "and." results.
(strchr): Add little-endian support.  Comment.  Move cntlzd
earlier in tail.
* sysdeps/powerpc/powerpc32/strchr.S: Likewise.
ChangeLog
sysdeps/powerpc/powerpc32/power7/strchr.S
sysdeps/powerpc/powerpc32/power7/strchrnul.S
sysdeps/powerpc/powerpc32/strchr.S
sysdeps/powerpc/powerpc64/power7/strchr.S
sysdeps/powerpc/powerpc64/power7/strchrnul.S
sysdeps/powerpc/powerpc64/strchr.S