This is the mail archive of the
mailing list for the glibc project.
Re: PowerPC LE strlen
- From: "Ryan S. Arnold" <ryan dot arnold at gmail dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>, Will Schmidt <will_schmidt at vnet dot ibm dot com>, Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Date: Tue, 13 Aug 2013 12:21:22 -0500
- Subject: Re: PowerPC LE strlen
- References: <20130809051815 dot GH3294 at bubble dot grove dot modra dot org>
On Fri, Aug 9, 2013 at 12:18 AM, Alan Modra <firstname.lastname@example.org> wrote:
> 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.
I'd like Will Schmidt and Adhemerval Zanella to comment on this series
There are some assumptions we make about alignment, and the data sizes
that we optimize for and most of our string function implementations
have been run through pipeline analysis tools verify that they perform
> This one is LE 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.
I'm fine with the strlen patch itself.
Ryan S. Arnold