[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r8248 - in /fsf/trunk/libc: ./ crypt/ localedata/ localedata/locales/ resolv/ resolv/nss_dns/ string/ sysdeps/unix/sysv/linu...



Author: eglibc
Date: Wed Apr  8 00:04:33 2009
New Revision: 8248

Log:
Import glibc-mainline for 2009-04-08

Added:
    fsf/trunk/libc/sysdeps/x86_64/strchrnul.S
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/crypt/Makefile
    fsf/trunk/libc/localedata/ChangeLog
    fsf/trunk/libc/localedata/locales/ks_IN@devanagari
    fsf/trunk/libc/resolv/nss_dns/dns-host.c
    fsf/trunk/libc/resolv/res_hconf.c
    fsf/trunk/libc/string/stratcliff.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
    fsf/trunk/libc/sysdeps/x86_64/memchr.S
    fsf/trunk/libc/wcsmbs/wcsatcliff.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Apr  8 00:04:33 2009
@@ -1,3 +1,22 @@
+2009-04-07  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* sysdeps/x86_64/strchrnul.S: New file.
+
+	* crypt/Makefile (LDLIBS-crypt.so): Use this variable instead of
+	depending libcrypt on -lfreebl3.
+
+	* sysdeps/unix/sysv/linux/kernel-features.h: Power also has
+	preadv/pwritev in 2.6.30.
+
+	* resolv/res_hconf.c (_res_hconf_trim_domain): Use strcasecmp
+	instead of __strcasecmp.
+	* resolv/nss_dns/dns-host.c (getanswer_r): Likewise.
+
+	* string/stratcliff.c (do_test): Add memchr tests..
+	* wcsmbs/wcsatcliff.c (MEMCHR): Define.
+	* sysdeps/x86_64/memchr.S: Fix handling of end of buffer after
+	first read quad word.
+
 2009-04-06  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* string/strverscmp.c (__strverscmp): Fix last cleanups.

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Wed Apr  8 00:04:33 2009
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2009-4-6
+GNU C Library NEWS -- history of user-visible changes.  2009-4-7
 Copyright (C) 1992-2008, 2009 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -37,7 +37,7 @@
 
 * New locales: nan_TW@latin, ks_IN
 
-* Faster strlen, strchr, and memchr on x86-64.
+* Faster strlen, strchr, strchrnul, and memchr for x86-64.
   Implemented by Ulrich Drepper.
 
 

Modified: fsf/trunk/libc/crypt/Makefile
==============================================================================
--- fsf/trunk/libc/crypt/Makefile (original)
+++ fsf/trunk/libc/crypt/Makefile Wed Apr  8 00:04:33 2009
@@ -44,7 +44,7 @@
 CPPFLAGS-sha256-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
 CPPFLAGS-sha512-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
 CPPFLAGS-md5-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
-$(objpfx)libcrypt.so: -lfreebl3
+LDLIBS-crypt.so = -lfreebl3
 else
 libcrypt-routines += md5 sha256 sha512
 

Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Wed Apr  8 00:04:33 2009
@@ -1,3 +1,8 @@
+2009-04-07  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* locales/ks_IN@devanagari: Replace duplicated information with copy.
+	Fix title.  Patch by Pravin Satpute <psatpute@xxxxxxxxxx>.
+
 2009-04-06  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* locales/ks_IN: New file.

Modified: fsf/trunk/libc/localedata/locales/ks_IN@devanagari
==============================================================================
--- fsf/trunk/libc/localedata/locales/ks_IN@devanagari (original)
+++ fsf/trunk/libc/localedata/locales/ks_IN@devanagari Wed Apr  8 00:04:33 2009
@@ -1,11 +1,11 @@
 comment_char    %
 escape_char     /
-% Kashmiri language locale for India.
+% Kashmiri(devanagari) language locale for India.
 % Contributed by Rakesh Pandit <rakesh.pandit@xxxxxxxxx> and 
 % Pravin Satpute <psatpute@xxxxxxxxxx>
 
 LC_IDENTIFICATION
-title      "Kashmiri language locale for India"
+title      "Kashmiri(devanagari) language locale for India"
 source     ""
 address    ""
 contact    ""
@@ -32,51 +32,20 @@
 END LC_IDENTIFICATION
 
 LC_CTYPE
-copy "i18n"
-
-translit_start
-include "translit_combining";""
-translit_end
+copy "ks_IN"
 END LC_CTYPE
 
 LC_COLLATE
-
-% Copy the template from ISO/IEC 14651
-copy "iso14651_t1"
-
+copy "ks_IN"
 END LC_COLLATE
 
 LC_MONETARY
-% This is the POSIX Locale definition the LC_MONETARY category.
-% These are generated based on XML base Locale difintion file
-% for IBM Class for Unicode/Java
-%
-int_curr_symbol       "<U0049><U004E><U0052><U0020>"
-currency_symbol       "<U0930><U0942>"
-mon_decimal_point     "<U002E>"
-mon_thousands_sep     "<U002C>"
-mon_grouping          3
-positive_sign         ""
-negative_sign         "<U002D>"
-int_frac_digits       2
-frac_digits           2
-p_cs_precedes         1
-p_sep_by_space        1
-n_cs_precedes         1
-n_sep_by_space        1
-p_sign_posn           1
-n_sign_posn           1
-%
+copy "ks_IN"
 END LC_MONETARY
 
 
 LC_NUMERIC
-% This is the POSIX Locale definition for the LC_NUMERIC  category.
-%
-decimal_point          "<U002E>"
-thousands_sep          "<U002C>"
-grouping               3
-%
+copy "ks_IN"
 END LC_NUMERIC
 
 
@@ -185,12 +154,7 @@
 
 
 LC_ADDRESS
-postal_fmt  "<U0025><U007A><U0025><U0063><U0025><U0054><U0025><U0073>/
-<U0025><U0062><U0025><U0065><U0025><U0072>"
-
-country_ab2 "<U0049><U004E>"
-country_ab3 "<U0049><U004E><U0044>"
-country_num 356
+copy "ks_IN"
 END LC_ADDRESS
 
 

Modified: fsf/trunk/libc/resolv/nss_dns/dns-host.c
==============================================================================
--- fsf/trunk/libc/resolv/nss_dns/dns-host.c (original)
+++ fsf/trunk/libc/resolv/nss_dns/dns-host.c Wed Apr  8 00:04:33 2009
@@ -824,7 +824,7 @@
       switch (type)
 	{
 	case T_PTR:
-	  if (__builtin_expect (__strcasecmp (tname, bp) != 0, 0))
+	  if (__builtin_expect (strcasecmp (tname, bp) != 0, 0))
 	    {
 	      syslog (LOG_NOTICE | LOG_AUTH, AskedForGot, qname, bp);
 	      cp += n;

Modified: fsf/trunk/libc/resolv/res_hconf.c
==============================================================================
--- fsf/trunk/libc/resolv/res_hconf.c (original)
+++ fsf/trunk/libc/resolv/res_hconf.c Wed Apr  8 00:04:33 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995-2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995-2006, 2007, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by David Mosberger (davidm@xxxxxxxxxxxxx).
 

Modified: fsf/trunk/libc/string/stratcliff.c
==============================================================================
--- fsf/trunk/libc/string/stratcliff.c (original)
+++ fsf/trunk/libc/string/stratcliff.c Wed Apr  8 00:04:33 2009
@@ -1,5 +1,5 @@
 /* Test for string function add boundaries of usable memory.
-   Copyright (C) 1996,1997,1999-2002,2003,2007 Free Software Foundation, Inc.
+   Copyright (C) 1996,1997,1999-2003,2007, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1996.
 
@@ -46,6 +46,7 @@
 # define STPNCPY stpncpy
 # define MEMCPY memcpy
 # define MEMPCPY mempcpy
+# define MEMCHR memchr
 #endif
 
 
@@ -202,6 +203,37 @@
 		  adr[inner] = L('T');
 		  adr[middle] = L('T');
 		}
+	    }
+        }
+
+      /* memchr test */
+      for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
+        {
+	  for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
+	    {
+	      adr[middle] = L('V');
+
+	      CHAR *cp = MEMCHR (&adr[outer], L('V'), 3 * size);
+
+	      if (cp - &adr[outer] != middle - outer)
+		{
+		  printf ("%s flunked for outer = %d, middle = %d\n",
+			  STRINGIFY (MEMCHR), outer, middle);
+		  result = 1;
+		}
+
+	      adr[middle] = L('T');
+	    }
+        }
+      for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
+        {
+	  CHAR *cp = MEMCHR (&adr[outer], L('V'), nchars - outer);
+
+	  if (cp != NULL)
+	    {
+	      printf ("%s flunked for outer = %d\n",
+		      STRINGIFY (MEMCHR), outer);
+	      result = 1;
 	    }
         }
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h Wed Apr  8 00:04:33 2009
@@ -532,7 +532,7 @@
 
 /* Support for preadv and pwritev was added in 2.6.30.  */
 #if __LINUX_KERNEL_VERSION >= 0x02061e \
-    && (defined __i386__ || defined __x86_64__)
+    && (defined __i386__ || defined __x86_64__ || defined __powerpc__)
 # define __ASSUME_PREADV	1
 # define __ASSUME_PWRITEV	1
 #endif

Modified: fsf/trunk/libc/sysdeps/x86_64/memchr.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/memchr.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/memchr.S Wed Apr  8 00:04:33 2009
@@ -37,12 +37,12 @@
 	shl	%cl, %esi
 	pmovmskb %xmm0, %ecx
 	andl	%esi, %ecx
-	movl	$0, %esi
+	movl	$16, %esi
 	jnz	1f
 	cmpq	%rsi, %rdx
 	jle	3f
 
-2:	movdqa	16(%rdi,%rsi), %xmm0
+2:	movdqa	(%rdi,%rsi), %xmm0
 	leaq	16(%rsi), %rsi
 	pcmpeqb	%xmm1, %xmm0
 	pmovmskb %xmm0, %ecx
@@ -54,10 +54,10 @@
 3:	xorl	%eax, %eax
 	ret
 
-1:	leaq	(%rdi,%rsi), %rax
+1:	leaq	-16(%rdi,%rsi), %rax
 	bsfl	%ecx, %ecx
 	addq	%rcx, %rax
-	addq	%rcx, %rsi
+	leaq	-16(%rsi,%rcx), %rsi
 	cmpq	%rsi, %rdx
 	jle	3b
 	ret

Added: fsf/trunk/libc/sysdeps/x86_64/strchrnul.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/strchrnul.S (added)
+++ fsf/trunk/libc/sysdeps/x86_64/strchrnul.S Wed Apr  8 00:04:33 2009
@@ -1,0 +1,63 @@
+/* strchrnul (str, ch) -- Return pointer to first occurrence of CH in STR
+	or terminating NUL byte.
+   For AMD x86-64.
+   Copyright (C) 2009 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+
+	.text
+ENTRY (__strchrnul)
+	movd	%esi, %xmm1
+	movq	%rdi, %rcx
+	punpcklbw %xmm1, %xmm1
+	andq	$~15, %rdi
+	pxor	%xmm2, %xmm2
+	punpcklbw %xmm1, %xmm1
+	orl	$0xffffffff, %esi
+	movdqa	(%rdi), %xmm0
+	pshufd	$0, %xmm1, %xmm1
+	subq	%rdi, %rcx
+	movdqa	%xmm0, %xmm3
+	leaq	16(%rdi), %rdi
+	pcmpeqb	%xmm1, %xmm0
+	pcmpeqb	%xmm2, %xmm3
+	shl	%cl, %esi
+	pmovmskb %xmm0, %edx
+	pmovmskb %xmm3, %ecx
+	orl	%edx, %ecx
+	andl	%esi, %ecx
+	jnz	1f
+
+2:	movdqa	(%rdi), %xmm0
+	leaq	16(%rdi), %rdi
+	movdqa	%xmm0, %xmm3
+	pcmpeqb	%xmm1, %xmm0
+	pcmpeqb	%xmm2, %xmm3
+	pmovmskb %xmm0, %edx
+	pmovmskb %xmm3, %ecx
+	orl	%edx, %ecx
+	jz	2b
+
+1:	bsfl	%ecx, %edx
+	leaq	-16(%rdi,%rdx), %rax
+	ret
+END (__strchrnul)
+
+weak_alias (__strchrnul, strchrnul)

Modified: fsf/trunk/libc/wcsmbs/wcsatcliff.c
==============================================================================
--- fsf/trunk/libc/wcsmbs/wcsatcliff.c (original)
+++ fsf/trunk/libc/wcsmbs/wcsatcliff.c Wed Apr  8 00:04:33 2009
@@ -15,6 +15,7 @@
 #define STPNCPY wcpncpy
 #define MEMCPY wmemcpy
 #define MEMPCPY wmempcpy
+#define MEMCHR wmemchr
 
 
 #include "../string/stratcliff.c"