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.14-143-g8c1a459


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  8c1a459f9a64abee69c154c8a0e5ab9be86256e4 (commit)
      from  798be72d127adf18f382323d0eed0a1e394967f8 (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=8c1a459f9a64abee69c154c8a0e5ab9be86256e4

commit 8c1a459f9a64abee69c154c8a0e5ab9be86256e4
Author: Andreas Schwab <schwab@redhat.com>
Date:   Thu Aug 4 14:59:25 2011 -0400

    Fix inline strncat/strncmp on x86

diff --git a/ChangeLog b/ChangeLog
index 80b7d7c..aaa6f8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-25  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/i386/i486/bits/string.h (__strncat_g): Correctly handle
+	__n bigger than INT_MAX+1.
+	(__strncmp_g): Likewise.
+
 2011-07-23  Ulrich Drepper  <drepper@gmail.com>
 
 	* posix/unistd.h: Define SEEK_DATA and SEEK_HOLE.
diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h
index 9f05c7e..4f8c104 100644
--- a/sysdeps/i386/i486/bits/string.h
+++ b/sysdeps/i386/i486/bits/string.h
@@ -1,6 +1,6 @@
 /* Optimized, inlined string functions.  i486 version.
-   Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2004,2007
-   	Free Software Foundation, Inc.
+   Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2004,2007,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
@@ -1058,8 +1058,8 @@ __strncat_g (char *__dest, __const char __src[], size_t __n)
      "movl %4, %3\n\t"
      "decl %1\n\t"
      "1:\n\t"
-     "decl	%3\n\t"
-     "js	2f\n\t"
+     "subl	$1,%3\n\t"
+     "jc	2f\n\t"
      "movb	(%2),%b0\n\t"
      "movsb\n\t"
      "testb	%b0,%b0\n\t"
@@ -1078,8 +1078,8 @@ __strncat_g (char *__dest, __const char __src[], size_t __n)
      "leal	1(%1),%1\n\t"
      "jne	1b\n"
      "2:\n\t"
-     "decl	%3\n\t"
-     "js	3f\n\t"
+     "subl	$1,%3\n\t"
+     "jc	3f\n\t"
      "movb	(%2),%b0\n\t"
      "leal	1(%2),%2\n\t"
      "movb	%b0,(%1)\n\t"
@@ -1219,8 +1219,8 @@ __strncmp_g (__const char *__s1, __const char *__s2, size_t __n)
   register int __res;
   __asm__ __volatile__
     ("1:\n\t"
-     "decl	%3\n\t"
-     "js	2f\n\t"
+     "subl	$1,%3\n\t"
+     "jc	2f\n\t"
      "movb	(%1),%b0\n\t"
      "incl	%1\n\t"
      "cmpb	%b0,(%2)\n\t"
diff --git a/sysdeps/x86_64/multiarch/strlen.S b/sysdeps/x86_64/multiarch/strlen.S
index d789707..43e2100 100644
--- a/sysdeps/x86_64/multiarch/strlen.S
+++ b/sysdeps/x86_64/multiarch/strlen.S
@@ -1,5 +1,5 @@
 /* strlen(str) -- determine the length of the string STR.
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
    Contributed by Ulrich Drepper <drepper@redhat.com>.
    This file is part of the GNU C Library.
 

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

Summary of changes:
 ChangeLog                         |    6 ++++++
 sysdeps/i386/i486/bits/string.h   |   16 ++++++++--------
 sysdeps/x86_64/multiarch/strlen.S |    2 +-
 3 files changed, 15 insertions(+), 9 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]