This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PowerPC LE memchr and memrchr

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.

Alan Modra
Australia Development Lab, IBM

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]