This is the mail archive of the
mailing list for the glibc project.
Re: PowerPC LE memchr and memrchr
- From: Alan Modra <amodra at gmail dot com>
- To: Will Schmidt <will_schmidt at vnet dot ibm dot com>
- Cc: "Ryan S. Arnold" <ryan dot arnold at gmail dot com>, libc-alpha at sourceware dot org
- Date: Thu, 15 Aug 2013 17:06:29 +0930
- Subject: Re: PowerPC LE memchr and memrchr
- References: <20130809053000 dot GP3294 at bubble dot grove dot modra dot org> <1376494372 dot 3823 dot 28 dot camel at brimstone>
On Wed, Aug 14, 2013 at 10:32:52AM -0500, Will Schmidt wrote:
> ".p2align alignment" versus ".align alignment" - Cosmetic or deliberate
> to avoid some unintended .p2align alignment[,fill[,max]] behavior?
Cosmetic. .align and .p2align are identical on powerpc.
> Looks like we initially have a mix of the two, so would be good to be
> clean those up regardless.
> > - b L(loop)
> > - /* Main loop to look for BYTE backwards in the string. Since it's a
> > - small loop (< 8 instructions), align it to 32-bytes. */
> > - .p2align 5
> > +
> > + /* Main loop to look for BYTE backwards in the string. */
> > + .align 4
> deliberate switch from 5 to 4 ?
Good question. I was experimenting, and forgot to remove the
experiment.. The thing is that the loop following does not have less
that eight instructions (it has nine), so there's no rationale for
aligning to 32 bytes. If you believe the comment, that is. And I
guess the comment really ought to have said "<= 8 instructions".
I'll remove that change.
Australia Development Lab, IBM