This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PowerPC: Align power7 memcpy using VSX to quadword
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>, Benjamin Herrenschmidt <benh at kernel dot crashing dot org>
- Date: Mon, 07 Jul 2014 13:57:03 -0300
- Subject: Re: PowerPC: Align power7 memcpy using VSX to quadword
- Authentication-results: sourceware.org; auth=none
- References: <201407071347 dot s67DldVh025081 at d06av02 dot portsmouth dot uk dot ibm dot com>
On 07-07-2014 10:47, Ulrich Weigand wrote:
> Adhemerval Zanella wrote:
>
>> * sysdeps/powerpc/powerpc64/power7/memcpy.S: Align VSX copies to 16B
>> to avoid alignment traps in non-cacheable memory.
>> * sysdeps/powerpc/powerpc32/power7/memcpy.S: Likewise.
> Looks basically good to me; a couple of comments:
>
>> /* Get the DST and SRC aligned to 8 bytes (16 for little-endian). */
> Comment should be updated too.
Thanks, I'll fix it.
>
>> L(copy_GE_32_unaligned):
>> clrldi 0,0,60 /* Number of bytes until the 1st dst quadword. */
>> -#ifndef __LITTLE_ENDIAN__
>> andi. 10,3,15 /* Check alignment of DST (against quadwords). */
>> -#endif
>> srdi 9,cnt,4 /* Number of full quadwords remaining. */
> It seems the "andi." can now be removed, since this was already done by the
> caller of the copy_GE_32_unaligned label. (Note that this is a #ifndef,
> and the caller now always does it the way it used to for __LITTLE_ENDIAN__.)
Indeed, it is safe remove it. I'll commit it shortly.
>
> Bye,
> Ulrich
>