This is the mail archive of the libc-alpha@sourceware.org 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]

[PATCH] powerpc: small fix to POWER7 32-bit memcpy


Hi,

This is another little gotcha that slipped through on my previous memcpy
patch. This fixes an incorrect instruction for 32-bit.

Regtested on ppc32.

Regards,
Luis


2010-05-28  Luis Machado  <luisgpm@br.ibm.com>

	* sysdeps/powerpc/powerpc32/power7/memcpy.S: Exchange srdi for srwi.

diff --git a/sysdeps/powerpc/powerpc32/power7/memcpy.S b/sysdeps/powerpc/powerpc32/power7/memcpy.S
index e3dfd2f..f0c332f 100644
--- a/sysdeps/powerpc/powerpc32/power7/memcpy.S
+++ b/sysdeps/powerpc/powerpc32/power7/memcpy.S
@@ -365,7 +365,7 @@ L(copy_GE_32_unaligned):
 	addi    3,3,8
 0:
 	clrlwi  10,12,28      /* Check alignment of SRC.  */
-	srdi    9,31,4	      /* Number of full quadwords remaining.  */
+	srwi    9,31,4	      /* Number of full quadwords remaining.  */
 
 	/* The proper alignment is present, it is OK to copy the bytes now.  */
 L(copy_GE_32_unaligned_cont):
@@ -375,7 +375,7 @@ L(copy_GE_32_unaligned_cont):
 	li      6,16	      /* Index for 16-bytes offsets.  */
 	li	7,32	      /* Index for 32-bytes offsets.  */
 	cmplwi  cr1,11,0
-	srdi    8,31,5	      /* Setup the loop counter.  */
+	srwi    8,31,5	      /* Setup the loop counter.  */
 	mr      10,3
 	mr      11,12
 	mtcrf   0x01,9



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