This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch, master, updated. glibc-2.13-85-g4420675


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  4420675c9d361643d1179ad67e0bb35c8fbdd1ce (commit)
      from  75ea32abcde4e1699328354e1804ea94560d2950 (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=4420675c9d361643d1179ad67e0bb35c8fbdd1ce

commit 4420675c9d361643d1179ad67e0bb35c8fbdd1ce
Author: Andreas Schwab <schwab@linux-m68k.org>
Date:   Sun Apr 17 22:03:53 2011 -0400

    Fix POWER4/POWER7 optimized strncmp to not read past differing bytes

diff --git a/ChangeLog b/ChangeLog
index d53eff3..71a7364 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-03-28  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/powerpc/powerpc32/power4/strncmp.S: Don't read past
+	differing bytes.
+	* sysdeps/powerpc/powerpc64/power4/strncmp.S: Likewise.
+	* sysdeps/powerpc/powerpc32/power7/strncmp.S: Likewise.
+	* sysdeps/powerpc/powerpc64/power7/strncmp.S: Likewise.
+
 2011-04-17  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #12420]
diff --git a/sysdeps/powerpc/powerpc32/power4/strncmp.S b/sysdeps/powerpc/powerpc32/power4/strncmp.S
index fc0835e..f5d47af 100644
--- a/sysdeps/powerpc/powerpc32/power4/strncmp.S
+++ b/sysdeps/powerpc/powerpc32/power4/strncmp.S
@@ -1,5 +1,5 @@
 /* Optimized strcmp implementation for PowerPC32.
-   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -139,30 +139,31 @@ L(u1):
 	bdz	L(u4)
 	cmpw	rWORD1, rWORD2
 	beq-	cr1, L(u4)
+	bne-	L(u4)
 	lbzu    rWORD3, 1(rSTR1)
 	lbzu	rWORD4, 1(rSTR2)
-	bne-	L(u4)
 	cmpwi	cr1, rWORD3, 0
 	bdz	L(u3)
 	cmpw	rWORD3, rWORD4
 	beq-    cr1, L(u3)
+	bne-    L(u3)
 	lbzu	rWORD1, 1(rSTR1)
 	lbzu	rWORD2, 1(rSTR2)
-	bne-    L(u3)
 	cmpwi	cr1, rWORD1, 0
 	bdz	L(u4)
 	cmpw	rWORD1, rWORD2
 	beq-	cr1, L(u4)
+	bne-	L(u4)
 	lbzu	rWORD3, 1(rSTR1)
 	lbzu	rWORD4, 1(rSTR2)
-	bne-	L(u4)
 	cmpwi	cr1, rWORD3, 0
 	bdz	L(u3)
 	cmpw	rWORD3, rWORD4
 	beq-    cr1, L(u3)
+	bne-	L(u3)
 	lbzu	rWORD1, 1(rSTR1)
 	lbzu	rWORD2, 1(rSTR2)
-	beq+    L(u1)
+	b       L(u1)
 
 L(u3):  sub     rRTN, rWORD3, rWORD4
         blr
diff --git a/sysdeps/powerpc/powerpc32/power7/strncmp.S b/sysdeps/powerpc/powerpc32/power7/strncmp.S
index ba72d0a..7ee9e03 100644
--- a/sysdeps/powerpc/powerpc32/power7/strncmp.S
+++ b/sysdeps/powerpc/powerpc32/power7/strncmp.S
@@ -1,5 +1,5 @@
 /* Optimized strcmp implementation for POWER7/PowerPC32.
-   Copyright (C) 2010 Free Software Foundation, Inc.
+   Copyright (C) 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -141,30 +141,31 @@ L(u1):
 	bdz	L(u4)
 	cmpw	rWORD1,rWORD2
 	beq	cr1,L(u4)
+	bne	L(u4)
 	lbzu	rWORD3,1(rSTR1)
 	lbzu	rWORD4,1(rSTR2)
-	bne	L(u4)
 	cmpwi	cr1,rWORD3,0
 	bdz	L(u3)
 	cmpw	rWORD3,rWORD4
 	beq	cr1,L(u3)
+	bne	L(u3)
 	lbzu	rWORD1,1(rSTR1)
 	lbzu	rWORD2,1(rSTR2)
-	bne	L(u3)
 	cmpwi	cr1,rWORD1,0
 	bdz	L(u4)
 	cmpw	rWORD1,rWORD2
 	beq	cr1,L(u4)
+	bne	L(u4)
 	lbzu	rWORD3,1(rSTR1)
 	lbzu	rWORD4,1(rSTR2)
-	bne	L(u4)
 	cmpwi	cr1,rWORD3,0
 	bdz	L(u3)
 	cmpw	rWORD3,rWORD4
 	beq	cr1,L(u3)
+	bne	L(u3)
 	lbzu	rWORD1,1(rSTR1)
 	lbzu	rWORD2,1(rSTR2)
-	beq	L(u1)
+	b	L(u1)
 
 L(u3):  sub	rRTN,rWORD3,rWORD4
 	blr
diff --git a/sysdeps/powerpc/powerpc64/power4/strncmp.S b/sysdeps/powerpc/powerpc64/power4/strncmp.S
index 7a1665d..94ae85b 100644
--- a/sysdeps/powerpc/powerpc64/power4/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/power4/strncmp.S
@@ -1,5 +1,5 @@
 /* Optimized strcmp implementation for PowerPC64.
-   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -143,30 +143,31 @@ L(u1):
 	bdz	L(u4)
 	cmpd	rWORD1, rWORD2
 	beq-	cr1, L(u4)
+	bne-	L(u4)
 	lbzu    rWORD3, 1(rSTR1)
 	lbzu	rWORD4, 1(rSTR2)
-	bne-	L(u4)
 	cmpdi	cr1, rWORD3, 0
 	bdz	L(u3)
 	cmpd	rWORD3, rWORD4
 	beq-    cr1, L(u3)
+	bne-    L(u3)
 	lbzu	rWORD1, 1(rSTR1)
 	lbzu	rWORD2, 1(rSTR2)
-	bne-    L(u3)
 	cmpdi	cr1, rWORD1, 0
 	bdz	L(u4)
 	cmpd	rWORD1, rWORD2
 	beq-	cr1, L(u4)
+	bne-	L(u4)
 	lbzu	rWORD3, 1(rSTR1)
 	lbzu	rWORD4, 1(rSTR2)
-	bne-	L(u4)
 	cmpdi	cr1, rWORD3, 0
 	bdz	L(u3)
 	cmpd	rWORD3, rWORD4
 	beq-    cr1, L(u3)
+	bne-    L(u3)
 	lbzu	rWORD1, 1(rSTR1)
 	lbzu	rWORD2, 1(rSTR2)
-	beq+    L(u1)
+	b       L(u1)
 
 L(u3):  sub     rRTN, rWORD3, rWORD4
         blr
diff --git a/sysdeps/powerpc/powerpc64/power7/strncmp.S b/sysdeps/powerpc/powerpc64/power7/strncmp.S
index 34f1e52..5ee5e2e 100644
--- a/sysdeps/powerpc/powerpc64/power7/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/power7/strncmp.S
@@ -1,5 +1,5 @@
 /* Optimized strcmp implementation for POWER7/PowerPC64.
-   Copyright (C) 2010 Free Software Foundation, Inc.
+   Copyright (C) 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -145,30 +145,31 @@ L(u1):
 	bdz	L(u4)
 	cmpd	rWORD1,rWORD2
 	beq	cr1,L(u4)
+	bne	L(u4)
 	lbzu	rWORD3,1(rSTR1)
 	lbzu	rWORD4,1(rSTR2)
-	bne	L(u4)
 	cmpdi	cr1,rWORD3,0
 	bdz	L(u3)
 	cmpd	rWORD3,rWORD4
 	beq	cr1,L(u3)
+	bne	L(u3)
 	lbzu	rWORD1,1(rSTR1)
 	lbzu	rWORD2,1(rSTR2)
-	bne	L(u3)
 	cmpdi	cr1,rWORD1,0
 	bdz	L(u4)
 	cmpd	rWORD1,rWORD2
 	beq	cr1,L(u4)
+	bne	L(u4)
 	lbzu	rWORD3,1(rSTR1)
 	lbzu	rWORD4,1(rSTR2)
-	bne	L(u4)
 	cmpdi	cr1,rWORD3,0
 	bdz	L(u3)
 	cmpd	rWORD3,rWORD4
 	beq	cr1,L(u3)
+	bne	L(u3)
 	lbzu	rWORD1,1(rSTR1)
 	lbzu	rWORD2,1(rSTR2)
-	beq	L(u1)
+	b	L(u1)
 
 L(u3):  sub	rRTN,rWORD3,rWORD4
 	blr

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                  |    8 ++++++++
 sysdeps/powerpc/powerpc32/power4/strncmp.S |   11 ++++++-----
 sysdeps/powerpc/powerpc32/power7/strncmp.S |   11 ++++++-----
 sysdeps/powerpc/powerpc64/power4/strncmp.S |   11 ++++++-----
 sysdeps/powerpc/powerpc64/power7/strncmp.S |   11 ++++++-----
 5 files changed, 32 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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