This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.15-110-gd73f93a
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 27 Jan 2012 23:06:10 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.15-110-gd73f93a
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via d73f93a4613a7deb35abd2de4c8df7378d81ee8f (commit)
from cdd9b365f92e0f30d64094a8400dec2a7e494110 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d73f93a4613a7deb35abd2de4c8df7378d81ee8f
commit d73f93a4613a7deb35abd2de4c8df7378d81ee8f
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Fri Jan 27 18:05:45 2012 -0500
PowerPC - A2 memcpy cache line size initialization
diff --git a/ChangeLog b/ChangeLog
index 93d33c0..fcec884 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-19 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+
+ * sysdeps/powerpc/powerpc32/a2/memcpy.S: Fix for when cache line
+ size is not set.
+ * sysdeps/powerpc/powerpc64/a2/memcpy.S: Likewise.
+
2012-01-27 Ulrich Drepper <drepper@gmail.com>
[BZ #13618]
diff --git a/sysdeps/powerpc/powerpc32/a2/memcpy.S b/sysdeps/powerpc/powerpc32/a2/memcpy.S
index f4c3c18..0e9d18e 100644
--- a/sysdeps/powerpc/powerpc32/a2/memcpy.S
+++ b/sysdeps/powerpc/powerpc32/a2/memcpy.S
@@ -1,5 +1,5 @@
/* Optimized memcpy implementation for PowerPC A2.
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
Contributed by Michael Brutman <brutman@us.ibm.com>.
This file is part of the GNU C Library.
@@ -126,8 +126,29 @@ L(dst_aligned):
cmplwi cr5, r9, 0
bne+ cr5,L(cachelineset)
- li r9,64
+/* __cache_line_size not set: generic byte copy without much optimization */
+ andi. r0,r5,1 /* If length is odd copy one byte. */
+ beq L(cachelinenotset_align)
+ lbz r7,0(r4) /* Read one byte from source. */
+ addi r5,r5,-1 /* Update length. */
+ addi r4,r4,1 /* Update source pointer address. */
+ stb r7,0(r6) /* Store one byte on dest. */
+ addi r6,r6,1 /* Update dest pointer address. */
+L(cachelinenotset_align):
+ cmpwi cr7,r5,0 /* If length is 0 return. */
+ beqlr cr7
+ ori r2,r2,0 /* Force a new dispatch group. */
+L(cachelinenotset_loop):
+ addic. r5,r5,-2 /* Update length. */
+ lbz r7,0(r4) /* Load 2 bytes from source. */
+ lbz r8,1(r4)
+ addi r4,r4,2 /* Update source pointer address. */
+ stb r7,0(r6) /* Store 2 bytes on dest. */
+ stb r8,1(r6)
+ addi r6,r6,2 /* Update dest pointer address. */
+ bne L(cachelinenotset_loop)
+ blr
L(cachelineset):
diff --git a/sysdeps/powerpc/powerpc64/a2/memcpy.S b/sysdeps/powerpc/powerpc64/a2/memcpy.S
index ac95171..f0c17ce 100644
--- a/sysdeps/powerpc/powerpc64/a2/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/a2/memcpy.S
@@ -1,5 +1,5 @@
/* Optimized memcpy implementation for PowerPC A2.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010,2012 Free Software Foundation, Inc.
Contributed by Michael Brutman <brutman@us.ibm.com>.
This file is part of the GNU C Library.
@@ -117,9 +117,35 @@ EALIGN (BP_SYM (memcpy), 5, 0)
.align 4
L(dst_aligned):
+ cmpdi cr0,r9,0 /* Cache line size set? */
+ bne+ cr0,L(cachelineset)
+
+/* __cache_line_size not set: generic byte copy without much optimization */
+ clrldi. r0,r5,63 /* If length is odd copy one byte */
+ beq L(cachelinenotset_align)
+ lbz r7,0(r4) /* Read one byte from source */
+ addi r5,r5,-1 /* Update length */
+ addi r4,r4,1 /* Update source pointer address */
+ stb r7,0(r6) /* Store one byte at dest */
+ addi r6,r6,1 /* Update dest pointer address */
+L(cachelinenotset_align):
+ cmpdi cr7,r5,0 /* If length is 0 return */
+ beqlr cr7
+ ori r2,r2,0 /* Force a new dispatch group */
+L(cachelinenotset_loop):
+ addic. r5,r5,-2 /* Update length */
+ lbz r7,0(r4) /* Load 2 bytes from source */
+ lbz r8,1(r4)
+ addi r4,r4,2 /* Update source pointer address */
+ stb r7,0(r6) /* Store 2 bytes on dest */
+ stb r8,1(r6)
+ addi r6,r6,2 /* Update dest pointer address */
+ bne L(cachelinenotset_loop)
+ blr
- cmpd cr5,r5,r10 /* Less than a cacheline to go? */
+L(cachelineset):
+ cmpd cr5,r5,r10 /* Less than a cacheline to go? */
neg r7,r6 /* How far to next cacheline bdy? */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 +++++
sysdeps/powerpc/powerpc32/a2/memcpy.S | 25 ++++++++++++++++++++++-
sysdeps/powerpc/powerpc64/a2/memcpy.S | 34 +++++++++++++++++++++++++++++---
3 files changed, 59 insertions(+), 6 deletions(-)
hooks/post-receive
--
GNU C Library master sources