[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r21045 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/sparc/ string/ sysdeps/sparc/sparc32/sparcv9/multiarch/ sysdeps/sparc/spa...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r21045 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/sparc/ string/ sysdeps/sparc/sparc32/sparcv9/multiarch/ sysdeps/sparc/spa...
- From: eglibc@xxxxxxxxxx
- Date: Sun, 07 Oct 2012 00:01:44 -0000
Author: eglibc
Date: Sun Oct 7 00:01:43 2012
New Revision: 21045
Log:
Import glibc-mainline for 2012-10-07
Added:
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara4.S
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara4.S
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/sparc/tls.h
fsf/trunk/libc/string/test-strstr.c
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/Makefile
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Oct 7 00:01:43 2012
@@ -1,3 +1,18 @@
+2012-10-06 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * string/test-strstr.c (check2): Add a test for page boundary.
+
+2012-10-05 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc64/multiarch/memset-niagara4.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara4.S: New
+ file.
+ * sysdeps/sparc/sparc64/multiarch/Makefile: Add to
+ sysdep_routines.
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memset.S: Use Niagara-4 memset
+ and bzero when HWCAP_SPARC_CRYPTO is present.
+
2012-10-05 H.J. Lu <hongjiu.lu@xxxxxxxxx>
[BZ #14602]
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sun Oct 7 00:01:43 2012
@@ -9,13 +9,13 @@
* The following bugs are resolved with this release:
- 1349, 3479, 5044, 5298, 5400, 6530, 6778, 6808, 9685, 9914, 10014,
- 10038, 10631, 11438, 11607, 13412, 13542, 13629, 13679, 13696, 13717,
- 13741, 13939, 13966, 14042, 14090, 14150, 14151, 14154, 14157, 14166,
- 14173, 14195, 14237, 14251, 14252, 14283, 14298, 14303, 14307, 14328,
- 14331, 14336, 14337, 14347, 14349, 14376, 14417, 14459, 14476, 14477,
- 14505, 14510, 14516, 14518, 14519, 14530, 14532, 14538, 14543, 14544,
- 14545, 14557, 14562, 14576, 14579, 14583, 14587, 14621, 14638, 14645,
+ 1349, 3479, 5044, 5298, 5400, 6530, 6778, 6808, 9685, 9914, 10014, 10038,
+ 10631, 11438, 11607, 13412, 13542, 13629, 13679, 13696, 13717, 13741,
+ 13939, 13966, 14042, 14090, 14150, 14151, 14154, 14157, 14166, 14173,
+ 14195, 14237, 14251, 14252, 14283, 14298, 14303, 14307, 14328, 14331,
+ 14336, 14337, 14347, 14349, 14376, 14417, 14459, 14476, 14477, 14505,
+ 14510, 14516, 14518, 14519, 14530, 14532, 14538, 14543, 14544, 14545,
+ 14557, 14562, 14568, 14576, 14579, 14583, 14587, 14621, 14638, 14645,
14648.
* Support for STT_GNU_IFUNC symbols added for s390 and s390x.
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sun Oct 7 00:01:43 2012
@@ -1,3 +1,10 @@
+2012-10-05 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ [BZ #14568]
+ * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
+ (DB_THREAD_SELF): Use constants for the register offsets. Correct
+ the case of a 64-bit debugger with a 32-bit inferior.
+
2012-10-05 H.J. Lu <hongjiu.lu@xxxxxxxxx>
[BZ #14557]
Modified: fsf/trunk/libc/nptl/sysdeps/sparc/tls.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/sparc/tls.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/sparc/tls.h Sun Oct 7 00:01:43 2012
@@ -117,9 +117,9 @@
#define THREAD_SELF __thread_self
/* Magic for libthread_db to know how to do THREAD_SELF. */
-# define DB_THREAD_SELF_INCLUDE <sys/ucontext.h>
# define DB_THREAD_SELF \
- REGISTER (32, 32, REG_G7 * 4, 0) REGISTER (64, 64, REG_G7 * 8, 0)
+ REGISTER (32, 32, 10 * 4, 0) \
+ REGISTER (64, __WORDSIZE, (6 * 8) + (__WORDSIZE==64?0:4), 0)
/* Access to data in the thread descriptor is easy. */
#define THREAD_GETMEM(descr, member) \
Modified: fsf/trunk/libc/string/test-strstr.c
==============================================================================
--- fsf/trunk/libc/string/test-strstr.c (original)
+++ fsf/trunk/libc/string/test-strstr.c Sun Oct 7 00:01:43 2012
@@ -161,10 +161,15 @@
{
const char s1[] = ", enable_static, \0, enable_shared, ";
char *exp_result;
-
+ char *s2 = (void *) buf1 + page_size - 18;
+
+ strcpy (s2, s1);
exp_result = stupid_strstr (s1, s1 + 18);
FOR_EACH_IMPL (impl, 0)
- check_result (impl, s1, s1 + 18, exp_result);
+ {
+ check_result (impl, s1, s1 + 18, exp_result);
+ check_result (impl, s2, s1 + 18, exp_result);
+ }
}
static int
Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile Sun Oct 7 00:01:43 2012
@@ -1,4 +1,4 @@
ifeq ($(subdir),string)
sysdep_routines += memcpy-ultra3 memcpy-niagara1 memcpy-niagara2 \
- memset-niagara1 memcpy-niagara4
+ memset-niagara1 memcpy-niagara4 memset-niagara4
endif
Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara4.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara4.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara4.S Sun Oct 7 00:01:43 2012
@@ -1,0 +1,1 @@
+#include <sparc64/multiarch/memset-niagara4.S>
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/Makefile (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/Makefile Sun Oct 7 00:01:43 2012
@@ -1,4 +1,4 @@
ifeq ($(subdir),string)
sysdep_routines += memcpy-ultra3 memcpy-niagara1 memcpy-niagara2 \
- memset-niagara1 memcpy-niagara4
+ memset-niagara1 memcpy-niagara4 memset-niagara4
endif
Added: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara4.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara4.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara4.S Sun Oct 7 00:01:43 2012
@@ -1,0 +1,124 @@
+/* Set a block of memory to some byte value. For SUN4V Niagara-4.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David S. Miller (davem@xxxxxxxxxxxxx)
+
+ 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#define ASI_BLK_INIT_QUAD_LDD_P 0xe2
+
+#if !defined NOT_IN_libc
+
+ .register %g2, #scratch
+ .register %g3, #scratch
+
+ .text
+ .align 32
+
+ENTRY(__memset_niagara4)
+ andcc %o1, 0xff, %o4
+ be,pt %icc, 1f
+ mov %o2, %o1
+ sllx %o4, 8, %g1
+ or %g1, %o4, %o2
+ sllx %o2, 16, %g1
+ or %g1, %o2, %o2
+ sllx %o2, 32, %g1
+ ba,pt %icc, 1f
+ or %g1, %o2, %o4
+END(__memset_niagara4)
+
+ .align 32
+ENTRY(__bzero_niagara4)
+ clr %o4
+1: cmp %o1, 16
+ ble %icc, .Ltiny
+ mov %o0, %o3
+ sub %g0, %o0, %g1
+ and %g1, 0x7, %g1
+ brz,pt %g1, .Laligned8
+ sub %o1, %g1, %o1
+1: stb %o4, [%o0 + 0x00]
+ subcc %g1, 1, %g1
+ bne,pt %icc, 1b
+ add %o0, 1, %o0
+.Laligned8:
+ cmp %o1, 64 + (64 - 8)
+ ble .Lmedium
+ sub %g0, %o0, %g1
+ andcc %g1, (64 - 1), %g1
+ brz,pn %g1, .Laligned64
+ sub %o1, %g1, %o1
+1: stx %o4, [%o0 + 0x00]
+ subcc %g1, 8, %g1
+ bne,pt %icc, 1b
+ add %o0, 0x8, %o0
+.Laligned64:
+ andn %o1, 64 - 1, %g1
+ sub %o1, %g1, %o1
+ brnz,pn %o4, .Lnon_bzero_loop
+ mov 0x20, %g2
+1: stxa %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
+ subcc %g1, 0x40, %g1
+ stxa %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
+ bne,pt %icc, 1b
+ add %o0, 0x40, %o0
+.Lpostloop:
+ cmp %o1, 8
+ bl,pn %icc, .Ltiny
+ membar #StoreStore|#StoreLoad
+.Lmedium:
+ andn %o1, 0x7, %g1
+ sub %o1, %g1, %o1
+1: stx %o4, [%o0 + 0x00]
+ subcc %g1, 0x8, %g1
+ bne,pt %icc, 1b
+ add %o0, 0x08, %o0
+ andcc %o1, 0x4, %g1
+ be,pt %icc, .Ltiny
+ sub %o1, %g1, %o1
+ stw %o4, [%o0 + 0x00]
+ add %o0, 0x4, %o0
+.Ltiny:
+ cmp %o1, 0
+ be,pn %icc, .Lexit
+1: subcc %o1, 1, %o1
+ stb %o4, [%o0 + 0x00]
+ bne,pt %icc, 1b
+ add %o0, 1, %o0
+.Lexit:
+ retl
+ mov %o3, %o0
+.Lnon_bzero_loop:
+ mov 0x08, %g3
+ mov 0x28, %o5
+1: stxa %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
+ subcc %g1, 0x40, %g1
+ stxa %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
+ stxa %o4, [%o0 + %g3] ASI_BLK_INIT_QUAD_LDD_P
+ stxa %o4, [%o0 + %o5] ASI_BLK_INIT_QUAD_LDD_P
+ add %o0, 0x10, %o0
+ stxa %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
+ stxa %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
+ stxa %o4, [%o0 + %g3] ASI_BLK_INIT_QUAD_LDD_P
+ stxa %o4, [%o0 + %o5] ASI_BLK_INIT_QUAD_LDD_P
+ bne,pt %icc, 1b
+ add %o0, 0x30, %o0
+ ba,a,pt %icc, .Lpostloop
+END(__bzero_niagara4)
+
+#endif
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S Sun Oct 7 00:01:43 2012
@@ -26,8 +26,19 @@
# ifdef SHARED
SETUP_PIC_REG_LEAF(o3, o5)
# endif
- andcc %o0, HWCAP_SPARC_BLKINIT, %g0
- be 9f
+ set HWCAP_SPARC_CRYPTO, %o1
+ andcc %o0, %o1, %g0
+ be 1f
+ andcc %o0, HWCAP_SPARC_BLKINIT, %g0
+# ifdef SHARED
+ sethi %gdop_hix22(__memset_niagara4), %o1
+ xor %o1, %gdop_lox10(__memset_niagara4), %o1
+# else
+ set __memset_niagara4, %o1
+# endif
+ ba 10f
+ nop
+1: be 9f
nop
# ifdef SHARED
sethi %gdop_hix22(__memset_niagara1), %o1
@@ -57,8 +68,19 @@
# ifdef SHARED
SETUP_PIC_REG_LEAF(o3, o5)
# endif
- andcc %o0, HWCAP_SPARC_BLKINIT, %g0
- be 9f
+ set HWCAP_SPARC_CRYPTO, %o1
+ andcc %o0, %o1, %g0
+ be 1f
+ andcc %o0, HWCAP_SPARC_BLKINIT, %g0
+# ifdef SHARED
+ sethi %gdop_hix22(__bzero_niagara4), %o1
+ xor %o1, %gdop_lox10(__bzero_niagara4), %o1
+# else
+ set __bzero_niagara4, %o1
+# endif
+ ba 10f
+ nop
+1: be 9f
nop
# ifdef SHARED
sethi %gdop_hix22(__bzero_niagara1), %o1
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits