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: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: azanella at linux dot vnet dot ibm dot com (Adhemerval Zanella)
- Cc: libc-alpha at sourceware dot org (GNU C. Library), benh at kernel dot crashing dot org (Benjamin Herrenschmidt)
- Date: Mon, 7 Jul 2014 15:47:38 +0200 (CEST)
- Subject: Re: PowerPC: Align power7 memcpy using VSX to quadword
- Authentication-results: sourceware.org; auth=none
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.
> 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__.)
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com