[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r12257 - in /fsf/trunk/libc: ./ include/ stdlib/ string/bits/ sysdeps/i386/i686/multiarch/
- To: commits@xxxxxxxxxx
- Subject: [commits] r12257 - in /fsf/trunk/libc: ./ include/ stdlib/ string/bits/ sysdeps/i386/i686/multiarch/
- From: eglibc@xxxxxxxxxx
- Date: Fri, 10 Dec 2010 08:03:23 -0000
Author: eglibc
Date: Fri Dec 10 00:03:21 2010
New Revision: 12257
Log:
Import glibc-mainline for 2010-12-10
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/include/atomic.h
fsf/trunk/libc/stdlib/msort.c
fsf/trunk/libc/string/bits/string3.h
fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp.S
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Dec 10 00:03:21 2010
@@ -1,3 +1,13 @@
+2010-12-09 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #11655]
+ * stdlib/msort.c (qsort_r): Make sure both phys_pages and pagesize
+ are initialized.
+
+2010-12-09 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * string/bits/string3.h (memmove, bcopy): Remove __restrict.
+
2010-12-03 Ulrich Drepper <drepper@xxxxxxxxx>
* po/it.po: Update from translation team.
Modified: fsf/trunk/libc/include/atomic.h
==============================================================================
--- fsf/trunk/libc/include/atomic.h (original)
+++ fsf/trunk/libc/include/atomic.h Fri Dec 10 00:03:21 2010
@@ -33,7 +33,7 @@
the multi-thread case. The interfaces have the prefix
"catomic_".
- - support functions like barriers. They also have the preifx
+ - support functions like barriers. They also have the prefix
"atomic_".
Architectures must provide a few lowlevel macros (the compare
Modified: fsf/trunk/libc/stdlib/msort.c
==============================================================================
--- fsf/trunk/libc/stdlib/msort.c (original)
+++ fsf/trunk/libc/stdlib/msort.c Fri Dec 10 00:03:21 2010
@@ -25,6 +25,7 @@
#include <unistd.h>
#include <memcopy.h>
#include <errno.h>
+#include <atomic.h>
struct msort_param
{
@@ -182,7 +183,7 @@
static long int phys_pages;
static int pagesize;
- if (phys_pages == 0)
+ if (pagesize == 0)
{
phys_pages = __sysconf (_SC_PHYS_PAGES);
@@ -196,6 +197,9 @@
/* The following determines that we will never use more than
a quarter of the physical memory. */
phys_pages /= 4;
+
+ /* Make sure phys_pages is written to memory. */
+ atomic_write_barrier ();
pagesize = __sysconf (_SC_PAGESIZE);
}
Modified: fsf/trunk/libc/string/bits/string3.h
==============================================================================
--- fsf/trunk/libc/string/bits/string3.h (original)
+++ fsf/trunk/libc/string/bits/string3.h Fri Dec 10 00:03:21 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2007, 2009, 2010 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
@@ -53,8 +53,7 @@
}
__extern_always_inline void *
-__NTH (memmove (void *__restrict __dest, __const void *__restrict __src,
- size_t __len))
+__NTH (memmove (void *__dest, __const void *__src, size_t __len))
{
return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
}
@@ -88,8 +87,7 @@
#ifdef __USE_BSD
__extern_always_inline void
-__NTH (bcopy (__const void *__restrict __src, void *__restrict __dest,
- size_t __len))
+__NTH (bcopy (__const void *__src, void *__dest, size_t __len))
{
(void) __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
}
Modified: fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp.S (original)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp.S Fri Dec 10 00:03:21 2010
@@ -40,37 +40,32 @@
need strncmp before the initialization happened. */
#if (defined SHARED || !defined USE_AS_STRNCMP) && !defined NOT_IN_libc
# ifdef SHARED
- .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
- .globl __i686.get_pc_thunk.bx
- .hidden __i686.get_pc_thunk.bx
- .p2align 4
- .type __i686.get_pc_thunk.bx,@function
-__i686.get_pc_thunk.bx:
- movl (%esp), %ebx
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.dx,"ax",@progbits
+ .globl __i686.get_pc_thunk.dx
+ .hidden __i686.get_pc_thunk.dx
+ .p2align 2
+ .type __i686.get_pc_thunk.dx,@function
+__i686.get_pc_thunk.dx:
+ movl (%esp), %edx
ret
+ .size __i686.get_pc_thunk.dx, .-__i686.get_pc_thunk.dx
.text
ENTRY(STRCMP)
.type STRCMP, @gnu_indirect_function
- pushl %ebx
- cfi_adjust_cfa_offset (4)
- cfi_rel_offset (ebx, 0)
- call __i686.get_pc_thunk.bx
- addl $_GLOBAL_OFFSET_TABLE_, %ebx
- cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ call __i686.get_pc_thunk.dx
+ addl $_GLOBAL_OFFSET_TABLE_, %edx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%edx)
jne 1f
call __init_cpu_features
-1: leal __STRCMP_IA32@GOTOFF(%ebx), %eax
- testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx)
- jz 2f
- leal __STRCMP_SSSE3@GOTOFF(%ebx), %eax
- testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx)
- jz 2f
- leal __STRCMP_SSE4_2@GOTOFF(%ebx), %eax
-2: popl %ebx
- cfi_adjust_cfa_offset (-4)
- cfi_restore (ebx)
- ret
+1: leal __STRCMP_SSE4_2@GOTOFF(%edx), %eax
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%edx)
+ jnz 2f
+ leal __STRCMP_SSSE3@GOTOFF(%edx), %eax
+ testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%edx)
+ jnz 2f
+ leal __STRCMP_IA32@GOTOFF(%edx), %ecx
+2: ret
END(STRCMP)
# else
.text
@@ -79,13 +74,13 @@
cmpl $0, KIND_OFFSET+__cpu_features
jne 1f
call __init_cpu_features
-1: leal __STRCMP_IA32, %eax
+1: leal __STRCMP_SSE4_2, %eax
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features
+ jnz 2f
+ leal __STRCMP_SSSE3, %eax
testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features
- jz 2f
- leal __STRCMP_SSSE3, %eax
- testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features
- jz 2f
- leal __STRCMP_SSE4_2, %eax
+ jnz 2f
+ leal __STRCMP_IA32, %eax
2: ret
END(STRCMP)
# endif