Re: [PATCH v4 3/4] powerpc/lib: implement strlen() in assembly

2018-06-08 Thread Segher Boessenkool
On Fri, Jun 08, 2018 at 01:45:13PM +0200, Gabriel Paubert wrote: > On Fri, Jun 08, 2018 at 10:20:41AM +, Christophe Leroy wrote: > > + rlwinm. r8, r9, 0, 0xff00 > > + beq 20f > > + rlwinm. r8, r9, 0, 0x00ff > > + beq 21f > > + rlwinm. r8, r9, 0, 0xff00 > > + beq

Re: [PATCH v4 3/4] powerpc/lib: implement strlen() in assembly

2018-06-08 Thread Gabriel Paubert
On Fri, Jun 08, 2018 at 10:20:41AM +, Christophe Leroy wrote: > The generic implementation of strlen() reads strings byte per byte. > > This patch implements strlen() in assembly based on a read of entire > words, in the same spirit as what some other arches and glibc do. > > On a 8xx the tim