This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv2] powerpc: Add optimized P8 strspn
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Date: Mon, 4 Apr 2016 11:42:11 -0500
- Subject: Re: [PATCHv2] powerpc: Add optimized P8 strspn
- Authentication-results: sourceware.org; auth=none
- References: <56FC0008 dot 7030302 at linux dot vnet dot ibm dot com> <20160402234040 dot GA17716 at gate dot crashing dot org> <57027ECE dot 7070101 at linux dot vnet dot ibm dot com>
On Mon, Apr 04, 2016 at 09:48:46AM -0500, Paul E. Murphy wrote:
> >> + lvsr v11, r0, r3
> >
> > That is 0, not r0.
> >
> >> + lvx v0, r0, r3 /* Note, unaligned load ignores lower bits. */
> >
> > Same for lvx.
>
> I'd intentionally used r0 in those cases to explicitly exploit its special
> meaning under those instructions. It it customary to explicitly use 0 in
> such cases?
Yes; the ISA document has many examples of this, see for example 6.4.1
in the Power ISA 3.0 doc.
Using "r0" here is quite misleading.
Segher