about summary refs log tree commit diff
path: root/bits/socket.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-08-17 18:40:11 +0930
committerAlan Modra <amodra@gmail.com>2013-10-04 10:39:32 +0930
commitdb9b4570c5dc550074140ac1d1677077fba29a26 (patch)
treec6469b8ce6b7ec28cc9f7c27484e67d351ce3349 /bits/socket.h
parentf7c399cff5bd04ee9dc117fb6b0f39597dc047c6 (diff)
downloadglibc-db9b4570c5dc550074140ac1d1677077fba29a26.tar.gz
glibc-db9b4570c5dc550074140ac1d1677077fba29a26.tar.xz
glibc-db9b4570c5dc550074140ac1d1677077fba29a26.zip
PowerPC LE strlen
http://sourceware.org/ml/libc-alpha/2013-08/msg00097.html

This is the first of nine patches adding little-endian support to the
existing optimised string and memory functions.  I did spend some
time with a power7 simulator looking at cycle by cycle behaviour for
memchr, but most of these patches have not been run on cpu simulators
to check that we are going as fast as possible.  I'm sure PowerPC can
do better.  However, the little-endian support mostly leaves main
loops unchanged, so I'm banking on previous authors having done a
good job on big-endian..  As with most code you stare at long enough,
I found some improvements for big-endian too.

Little-endian support for strlen.  Like most of the string functions,
I leave the main word or multiple-word loops substantially unchanged,
just needing to modify the tail.

Removing the branch in the power7 functions is just a tidy.  .align
produces a branch anyway.  Modifying regs in the non-power7 functions
is to suit the new little-endian tail.

	* sysdeps/powerpc/powerpc64/power7/strlen.S (strlen): Add little-endian
	support.  Don't branch over align.
	* sysdeps/powerpc/powerpc32/power7/strlen.S: Likewise.
	* sysdeps/powerpc/powerpc64/strlen.S (strlen): Add little-endian support.
	Rearrange tmp reg use to suit.  Comment.
	* sysdeps/powerpc/powerpc32/strlen.S: Likewise.
Diffstat (limited to 'bits/socket.h')
0 files changed, 0 insertions, 0 deletions