PowerPC LE strnlen
authorAlan Modra <amodra@gmail.com>
Sat, 17 Aug 2013 09:10:48 +0000 (18:40 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 4 Oct 2013 01:09:42 +0000 (10:39 +0930)
commit33ee81de05e83ce12f32a491270bb4c1611399c7
treebe23e09b15939752f6c48310d8674ea97dcb2c9a
parentdb9b4570c5dc550074140ac1d1677077fba29a26
PowerPC LE strnlen
http://sourceware.org/ml/libc-alpha/2013-08/msg00098.html

The existing strnlen code has a number of defects, so this patch is more
than just adding little-endian support.  The changes here are similar to
those for memchr.

* sysdeps/powerpc/powerpc64/power7/strnlen.S (strnlen): Add
little-endian support.  Remove unnecessary "are we done" tests.
Handle "s" wrapping around zero and extremely large "size".
Correct main loop count.  Handle single left-over word from main
loop inline rather than by using small_loop.  Correct comments.
Delete "zero" tail, use "end_max" instead.
* sysdeps/powerpc/powerpc32/power7/strnlen.S: Likewise.
ChangeLog
sysdeps/powerpc/powerpc32/power7/strnlen.S
sysdeps/powerpc/powerpc64/power7/strnlen.S