From 1ad9ccd18a9d2ca18c12143a2a0d6dfe78a382a5 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 8 Apr 2009 16:24:32 +0000 Subject: Updated to fedora-glibc-20090408T1602 --- ChangeLog | 19 ++++++++++ NEWS | 4 +- crypt/Makefile | 2 +- fedora/branch.mk | 4 +- fedora/glibc.spec.in | 8 +++- localedata/ChangeLog | 5 +++ localedata/locales/ks_IN@devanagari | 50 ++++-------------------- resolv/Versions | 2 +- resolv/nss_dns/dns-host.c | 2 +- resolv/res_hconf.c | 2 +- string/stratcliff.c | 34 ++++++++++++++++- sysdeps/unix/sysv/linux/kernel-features.h | 2 +- sysdeps/x86_64/memchr.S | 8 ++-- sysdeps/x86_64/strchrnul.S | 63 +++++++++++++++++++++++++++++++ wcsmbs/wcsatcliff.c | 1 + 15 files changed, 147 insertions(+), 59 deletions(-) create mode 100644 sysdeps/x86_64/strchrnul.S diff --git a/ChangeLog b/ChangeLog index 4923d25b73..ce7cbdc704 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2009-04-07 Ulrich Drepper + + * 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 * string/strverscmp.c (__strverscmp): Fix last cleanups. diff --git a/NEWS b/NEWS index e969b61b58..c50a66bb43 100644 --- a/NEWS +++ b/NEWS @@ -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 @@ Version 2.10 * 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. diff --git a/crypt/Makefile b/crypt/Makefile index 3f73d25ea2..b9c8797474 100644 --- a/crypt/Makefile +++ b/crypt/Makefile @@ -44,7 +44,7 @@ ifeq ($(nss-crypt),yes) 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 diff --git a/fedora/branch.mk b/fedora/branch.mk index 83f90a76ff..040c0d225a 100644 --- a/fedora/branch.mk +++ b/fedora/branch.mk @@ -3,5 +3,5 @@ glibc-branch := fedora glibc-base := HEAD DIST_BRANCH := devel COLLECTION := dist-f8 -fedora-sync-date := 2009-04-07 06:57 UTC -fedora-sync-tag := fedora-glibc-20090407T0657 +fedora-sync-date := 2009-04-08 16:02 UTC +fedora-sync-tag := fedora-glibc-20090408T1602 diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in index eb4f745790..62e55145ab 100644 --- a/fedora/glibc.spec.in +++ b/fedora/glibc.spec.in @@ -19,7 +19,7 @@ Summary: The GNU libc libraries Name: glibc Version: @glibcversion@ -Release: 13 +Release: 14 # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries. # Things that are linked directly into dynamically linked programs # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional @@ -320,7 +320,7 @@ CC="$GCC" CXX="$GXX" CFLAGS="$build_CFLAGS" ../configure --prefix=%{_prefix} \ --with-headers=%{_prefix}/include --enable-bind-now \ --with-tls --with-__thread --build %{nptl_target_cpu}-redhat-linux \ --host %{nptl_target_cpu}-redhat-linux \ - --disable-profile --enable-experimental-malloc --enable-nss-crypt + --disable-profile --enable-nss-crypt make %{?_smp_mflags} -r CFLAGS="$build_CFLAGS" PARALLELMFLAGS=-s cd .. @@ -1009,6 +1009,10 @@ rm -f *.filelist* %endif %changelog +* Wed Apr 8 2009 Jakub Jelinek 2.9.90-14 +- update from trunk +- temporarily disable experimental malloc + * Tue Apr 7 2009 Jakub Jelinek 2.9.90-13 - update from trunk - fix strverscmp (#494457) diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 9c0a28b979..8958c21bbc 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2009-04-07 Ulrich Drepper + + * locales/ks_IN@devanagari: Replace duplicated information with copy. + Fix title. Patch by Pravin Satpute . + 2009-04-06 Ulrich Drepper * locales/ks_IN: New file. diff --git a/localedata/locales/ks_IN@devanagari b/localedata/locales/ks_IN@devanagari index 2e55de75bf..ebc523481c 100644 --- a/localedata/locales/ks_IN@devanagari +++ b/localedata/locales/ks_IN@devanagari @@ -1,11 +1,11 @@ comment_char % escape_char / -% Kashmiri language locale for India. +% Kashmiri(devanagari) language locale for India. % Contributed by Rakesh Pandit and % Pravin Satpute LC_IDENTIFICATION -title "Kashmiri language locale for India" +title "Kashmiri(devanagari) language locale for India" source "" address "" contact "" @@ -32,51 +32,20 @@ category "ks_IN@devanagari:2008";LC_TELEPHONE 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 "" -currency_symbol "" -mon_decimal_point "" -mon_thousands_sep "" -mon_grouping 3 -positive_sign "" -negative_sign "" -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 "" -thousands_sep "" -grouping 3 -% +copy "ks_IN" END LC_NUMERIC @@ -185,12 +154,7 @@ END LC_NAME LC_ADDRESS -postal_fmt "/ -" - -country_ab2 "" -country_ab3 "" -country_num 356 +copy "ks_IN" END LC_ADDRESS diff --git a/resolv/Versions b/resolv/Versions index e5089f9c69..4b2e5e9dbc 100644 --- a/resolv/Versions +++ b/resolv/Versions @@ -102,7 +102,7 @@ libnss_dns { _nss_dns_gethostbyname_r; _nss_dns_getnetbyaddr_r; _nss_dns_getnetbyname_r; _nss_dns_getcanonname_r; _nss_dns_gethostbyaddr2_r; - # _nss_dns_gethostbyname4_r; + _nss_dns_gethostbyname4_r; } } diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c index a9462ae97a..62e67e8b01 100644 --- a/resolv/nss_dns/dns-host.c +++ b/resolv/nss_dns/dns-host.c @@ -824,7 +824,7 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, 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; diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c index 25f7397927..ed55bec296 100644 --- a/resolv/res_hconf.c +++ b/resolv/res_hconf.c @@ -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@azstarnet.com). diff --git a/string/stratcliff.c b/string/stratcliff.c index 77fe2bcca9..f90616c260 100644 --- a/string/stratcliff.c +++ b/string/stratcliff.c @@ -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 , 1996. @@ -46,6 +46,7 @@ # define STPNCPY stpncpy # define MEMCPY memcpy # define MEMPCPY mempcpy +# define MEMCHR memchr #endif @@ -205,6 +206,37 @@ do_test (void) } } + /* 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; + } + } + /* This function only exists for single-byte characters. */ #ifndef WCSTEST /* rawmemchr test */ diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index a640765b5c..5f1ffdb9c5 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -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 diff --git a/sysdeps/x86_64/memchr.S b/sysdeps/x86_64/memchr.S index 15484cb9f3..644362d565 100644 --- a/sysdeps/x86_64/memchr.S +++ b/sysdeps/x86_64/memchr.S @@ -37,12 +37,12 @@ ENTRY (memchr) 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 @@ ENTRY (memchr) 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 diff --git a/sysdeps/x86_64/strchrnul.S b/sysdeps/x86_64/strchrnul.S new file mode 100644 index 0000000000..576027a38d --- /dev/null +++ b/sysdeps/x86_64/strchrnul.S @@ -0,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 + + + .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) diff --git a/wcsmbs/wcsatcliff.c b/wcsmbs/wcsatcliff.c index 22db60763f..b29571f294 100644 --- a/wcsmbs/wcsatcliff.c +++ b/wcsmbs/wcsatcliff.c @@ -15,6 +15,7 @@ #define STPNCPY wcpncpy #define MEMCPY wmemcpy #define MEMPCPY wmempcpy +#define MEMCHR wmemchr #include "../string/stratcliff.c" -- cgit v1.2.3