[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r17830 - in /fsf/trunk/libc: ./ libio/ nis/nss_compat/ sysdeps/sparc/ sysdeps/sparc/sparc32/ sysdeps/sparc/sparc32/sparcv9/ ...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r17830 - in /fsf/trunk/libc: ./ libio/ nis/nss_compat/ sysdeps/sparc/ sysdeps/sparc/sparc32/ sysdeps/sparc/sparc32/sparcv9/ ...
- From: eglibc@xxxxxxxxxx
- Date: Fri, 30 Mar 2012 00:01:46 -0000
Author: eglibc
Date: Fri Mar 30 00:01:45 2012
New Revision: 17830
Log:
Import glibc-mainline for 2012-03-30
Added:
fsf/trunk/libc/sysdeps/sparc/mempcpy.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memcpy.c
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memcpy.c
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memset.c
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/rtld-memcpy.c
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/rtld-memset.c
fsf/trunk/libc/sysdeps/sparc/sparc64/rtld-memcpy.c
fsf/trunk/libc/sysdeps/sparc/sparc64/rtld-memset.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/libio/fileops.c
fsf/trunk/libc/nis/nss_compat/compat-initgroups.c
fsf/trunk/libc/sysdeps/sparc/sparc32/memcpy.S
fsf/trunk/libc/sysdeps/sparc/sparc64/memcpy.S
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Mar 30 00:01:45 2012
@@ -1,4 +1,44 @@
+2012-03-29 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * libio/fileops.c (_IO_new_file_xsputn): Don't try to optimize
+ small copies by hand.
+
+2012-03-28 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
+
+ [BZ #13761]
+ * nis/nss_compat/compat-initgroups.c (getgrent_next_nss,
+ _nss_compat_initgroups_dyn): Fall back to malloc/free
+ for large group memberships.
+
2012-03-28 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc32/memcpy.S: Implement mempcpy using a stub
+ that branches into memcpy.
+ * sysdeps/sparc/sparc64/memcpy.S: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memcpy.S: Add mempcpy multiarch
+ bits.
+ * sysdeps/sparc/sparc64/rtld-memcpy.c: Include generic mempcpy
+ implementation too.
+ * sysdeps/sparc/mempcpy.S: New file.
+
+ * sysdeps/sparc/sparc64/multiarch/memcpy.S: Provide a hidden def to
+ the IFUNC routine in the libc case.
+ * sysdeps/sparc/sparc64/multiarch/memcpy.S: Likewise.
+
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c: New file.
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memcpy.c: New file.
+ * sysdeps/sparc/sparc32/sparcv9/rtld-memset.c: New file.
+ * sysdeps/sparc/sparc32/sparcv9/rtld-memcpy.c: New file.
+ * sysdeps/sparc/sparc64/multiarch/rtld-memset.c: New file.
+ * sysdeps/sparc/sparc64/multiarch/rtld-memcpy.c: New file.
+ * sysdeps/sparc/sparc64/rtld-memset.c: New file.
+ * sysdeps/sparc/sparc64/rtld-memcpy.c: New file.
+
+ * sysdeps/sparc/sparc64/multiarch/memset-niagara1.S: Unroll main
+ loop to 256 bytes instead of 64 bytes and fix test signedness.
* sysdeps/sparc/Makefile: Add -fPIC to ASFLAGS-.os here....
* sysdeps/sparc/sparc32/Makefile: rather than here...
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Fri Mar 30 00:01:45 2012
@@ -16,9 +16,9 @@
11494, 12047, 13058, 13525, 13526, 13527, 13528, 13529, 13530, 13531,
13532, 13533, 13547, 13551, 13552, 13553, 13555, 13559, 13566, 13583,
13618, 13637, 13656, 13658, 13673, 13695, 13704, 13706, 13726, 13738,
- 13760, 13786, 13792, 13806, 13824, 13840, 13841, 13844, 13846, 13851,
- 13852, 13854, 13871, 13879, 13883, 13892, 13910, 13911, 13912, 13913,
- 13915, 13916, 13917, 13918, 13919, 13920, 13921
+ 13760, 13761, 13786, 13792, 13806, 13824, 13840, 13841, 13844, 13846,
+ 13851, 13852, 13854, 13871, 13879, 13883, 13892, 13910, 13911, 13912,
+ 13913, 13915, 13916, 13917, 13918, 13919, 13920, 13921
* ISO C11 support:
Modified: fsf/trunk/libc/libio/fileops.c
==============================================================================
--- fsf/trunk/libc/libio/fileops.c (original)
+++ fsf/trunk/libc/libio/fileops.c Fri Mar 30 00:01:45 2012
@@ -1341,24 +1341,13 @@
{
if (count > to_do)
count = to_do;
- if (count > 20)
- {
#ifdef _LIBC
- f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);
+ f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);
#else
- memcpy (f->_IO_write_ptr, s, count);
- f->_IO_write_ptr += count;
-#endif
- s += count;
- }
- else
- {
- register char *p = f->_IO_write_ptr;
- register int i = (int) count;
- while (--i >= 0)
- *p++ = *s++;
- f->_IO_write_ptr = p;
- }
+ memcpy (f->_IO_write_ptr, s, count);
+ f->_IO_write_ptr += count;
+#endif
+ s += count;
to_do -= count;
}
if (to_do + must_flush > 0)
Modified: fsf/trunk/libc/nis/nss_compat/compat-initgroups.c
==============================================================================
--- fsf/trunk/libc/nis/nss_compat/compat-initgroups.c (original)
+++ fsf/trunk/libc/nis/nss_compat/compat-initgroups.c Fri Mar 30 00:01:45 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2004,2006,2007,2009,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2004,2006,2007,2009,2010,2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxx>, 1998.
@@ -296,6 +296,8 @@
if (nss_initgroups_dyn (user, group, &mystart, &mysize, &mygroups,
limit, errnop) == NSS_STATUS_SUCCESS)
{
+ status = NSS_STATUS_NOTFOUND;
+
/* If there is no blacklist we can trust the underlying
initgroups implementation. */
if (ent->blacklist.current <= 1)
@@ -308,6 +310,7 @@
overwrite the pointer with one to a bigger buffer. */
char *tmpbuf = buffer;
size_t tmplen = buflen;
+ bool use_malloc = false;
for (int i = 0; i < mystart; i++)
{
@@ -315,21 +318,36 @@
tmpbuf, tmplen, errnop))
== NSS_STATUS_TRYAGAIN
&& *errnop == ERANGE)
- if (tmpbuf == buffer)
- {
- tmplen *= 2;
- tmpbuf = __alloca (tmplen);
- }
- else
- tmpbuf = extend_alloca (tmpbuf, tmplen, 2 * tmplen);
+ {
+ if (__libc_use_alloca (tmplen * 2))
+ {
+ if (tmpbuf == buffer)
+ {
+ tmplen *= 2;
+ tmpbuf = __alloca (tmplen);
+ }
+ else
+ tmpbuf = extend_alloca (tmpbuf, tmplen, tmplen * 2);
+ }
+ else
+ {
+ tmplen *= 2;
+ char *newbuf = realloc (use_malloc ? tmpbuf : NULL, tmplen);
+
+ if (newbuf == NULL)
+ {
+ status = NSS_STATUS_TRYAGAIN;
+ goto done;
+ }
+ use_malloc = true;
+ tmpbuf = newbuf;
+ }
+ }
if (__builtin_expect (status != NSS_STATUS_NOTFOUND, 1))
{
if (__builtin_expect (status != NSS_STATUS_SUCCESS, 0))
- {
- free (mygroups);
- return status;
- }
+ goto done;
if (!in_blacklist (grpbuf.gr_name,
strlen (grpbuf.gr_name), ent)
@@ -347,11 +365,17 @@
}
}
}
+
+ status = NSS_STATUS_NOTFOUND;
+
+ done:
+ if (use_malloc)
+ free (tmpbuf);
}
free (mygroups);
- return NSS_STATUS_NOTFOUND;
+ return status;
}
free (mygroups);
@@ -508,6 +532,7 @@
char *tmpbuf;
enum nss_status status;
ent_t intern = { true, false, false, NULL, {NULL, 0, 0} };
+ bool use_malloc = false;
status = internal_setgrent (&intern);
if (status != NSS_STATUS_SUCCESS)
@@ -521,13 +546,32 @@
user, group, start, size,
groupsp, limit, errnop))
== NSS_STATUS_TRYAGAIN && *errnop == ERANGE)
- tmpbuf = extend_alloca (tmpbuf, buflen, 2 * buflen);
+ if (__libc_use_alloca (buflen * 2))
+ tmpbuf = extend_alloca (tmpbuf, buflen, 2 * buflen);
+ else
+ {
+ buflen *= 2;
+ char *newbuf = realloc (use_malloc ? tmpbuf : NULL, buflen);
+ if (newbuf == NULL)
+ {
+ status = NSS_STATUS_TRYAGAIN;
+ goto done;
+ }
+ use_malloc = true;
+ tmpbuf = newbuf;
+ }
}
while (status == NSS_STATUS_SUCCESS);
+ status = NSS_STATUS_SUCCESS;
+
+ done:
+ if (use_malloc)
+ free (tmpbuf);
+
internal_endgrent (&intern);
- return NSS_STATUS_SUCCESS;
+ return status;
}
Added: fsf/trunk/libc/sysdeps/sparc/mempcpy.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/mempcpy.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/mempcpy.S Fri Mar 30 00:01:45 2012
@@ -1,0 +1,1 @@
+/* mempcpy is in memcpy.S */
Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/memcpy.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/memcpy.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/memcpy.S Fri Mar 30 00:01:45 2012
@@ -104,11 +104,17 @@
std %t2, [%dst + offset + offset2 + 0x08];
.text
+ENTRY(__mempcpy)
+ add %o0, %o2, %g1
+ ba 101f
+ st %g1, [%sp + 64]
+END(__mempcpy)
+
.align 4
-
ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
+ st %o0, [%sp + 64]
+101:
sub %o0, %o1, %o4
- st %o0, [%sp + 64]
9: andcc %o4, 3, %o5
0: bne 86f
cmp %o2, 15
@@ -641,3 +647,7 @@
END(memcpy)
libc_hidden_builtin_def (memcpy)
+
+libc_hidden_def (__mempcpy)
+weak_alias (__mempcpy, mempcpy)
+libc_hidden_builtin_def (mempcpy)
Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memcpy.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memcpy.c (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memcpy.c Fri Mar 30 00:01:45 2012
@@ -1,0 +1,1 @@
+#include <sparc64/multiarch/rtld-memcpy.c>
Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c Fri Mar 30 00:01:45 2012
@@ -1,0 +1,1 @@
+#include <sparc64/multiarch/rtld-memset.c>
Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memcpy.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memcpy.c (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memcpy.c Fri Mar 30 00:01:45 2012
@@ -1,0 +1,1 @@
+#include <sparc64/rtld-memcpy.c>
Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memset.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memset.c (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memset.c Fri Mar 30 00:01:45 2012
@@ -1,0 +1,1 @@
+#include <sparc64/rtld-memset.c>
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/memcpy.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/memcpy.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/memcpy.S Fri Mar 30 00:01:45 2012
@@ -374,19 +374,24 @@
mov %g4, %o0
END(__memcpy_large)
+ENTRY(__mempcpy)
+ ba,pt %xcc, 210f
+ add %o0, %o2, %g4
+END(__mempcpy)
+
.align 32
ENTRY(memcpy)
+ mov %o0, %g4 /* IEU0 Group */
210:
#ifndef USE_BPR
- srl %o2, 0, %o2 /* IEU1 Group */
+ srl %o2, 0, %o2 /* IEU1 */
#endif
brz,pn %o2, 209b /* CTI Group */
- mov %o0, %g4 /* IEU0 */
-218: cmp %o2, 15 /* IEU1 Group */
- bleu,pn %xcc, 208b /* CTI */
- cmp %o2, (64 * 6) /* IEU1 Group */
- bgeu,pn %xcc, 200b /* CTI */
- andcc %o0, 7, %g2 /* IEU1 Group */
+218: cmp %o2, 15 /* IEU1 */
+ bleu,pn %xcc, 208b /* CTI Group */
+ cmp %o2, (64 * 6) /* IEU1 */
+ bgeu,pn %xcc, 200b /* CTI Group */
+ andcc %o0, 7, %g2 /* IEU1 */
sub %o0, %o1, %g5 /* IEU0 */
andcc %g5, 3, %o5 /* IEU1 Group */
bne,pn %xcc, 212f /* CTI */
@@ -569,3 +574,7 @@
END(memcpy)
libc_hidden_builtin_def (memcpy)
+
+libc_hidden_def (__mempcpy)
+weak_alias (__mempcpy, mempcpy)
+libc_hidden_builtin_def (mempcpy)
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S Fri Mar 30 00:01:45 2012
@@ -43,13 +43,19 @@
.text
+ENTRY(__mempcpy_niagara1)
+ ba,pt %XCC, 101f
+ add %o0, %o2, %g5
+END(__mempcpy_niagara1)
+
.align 32
ENTRY(__memcpy_niagara1)
+100: /* %o0=dst, %o1=src, %o2=len */
+ mov %o0, %g5
+101:
# ifndef USE_BPR
srl %o2, 0, %o2
# endif
-100: /* %o0=dst, %o1=src, %o2=len */
- mov %o0, %g5
cmp %o2, 0
be,pn %XCC, 85f
218: or %o0, %o1, %o3
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S Fri Mar 30 00:01:45 2012
@@ -145,13 +145,19 @@
.text
+ENTRY(__mempcpy_niagara2)
+ ba,pt %XCC, 101f
+ add %o0, %o2, %g5
+END(__mempcpy_niagara2)
+
.align 32
ENTRY(__memcpy_niagara2)
+100: /* %o0=dst, %o1=src, %o2=len */
+ mov %o0, %g5
+101:
# ifndef USE_BPR
srl %o2, 0, %o2
# endif
-100: /* %o0=dst, %o1=src, %o2=len */
- mov %o0, %g5
cmp %o2, 0
be,pn %XCC, 85f
218: or %o0, %o1, %o3
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S Fri Mar 30 00:01:45 2012
@@ -37,6 +37,11 @@
.register %g6,#scratch
.text
+
+ENTRY(__mempcpy_ultra3)
+ ba,pt %XCC, 101f
+ add %o0, %o2, %g5
+END(__mempcpy_ultra3)
/* Special/non-trivial issues of this code:
*
@@ -57,6 +62,7 @@
100: /* %o0=dst, %o1=src, %o2=len */
mov %o0, %g5
+101:
cmp %o2, 0
be,pn %XCC, out
218: or %o0, %o1, %o3
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S Fri Mar 30 00:01:45 2012
@@ -1,5 +1,5 @@
/* Multiple versions of memcpy
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
Contributed by David S. Miller (davem@xxxxxxxxxxxxx)
This file is part of the GNU C Library.
@@ -72,12 +72,72 @@
mov %o1, %o0
END(memcpy)
-# undef libc_hidden_builtin_def
-/* IFUNC doesn't work with the hidden functions in a shared library. */
-# define libc_hidden_builtin_def(name) \
- .globl __GI_memcpy; __GI_memcpy = __memcpy_ultra1
+ENTRY(__mempcpy)
+ .type __mempcpy, @gnu_indirect_function
+# ifdef SHARED
+ SETUP_PIC_REG_LEAF(o3, o5)
+# endif
+ andcc %o0, HWCAP_SPARC_N2, %g0
+ be 1f
+ andcc %o0, HWCAP_SPARC_BLKINIT, %g0
+# ifdef SHARED
+ sethi %gdop_hix22(__mempcpy_niagara2), %o1
+ xor %o1, %gdop_lox10(__mempcpy_niagara2), %o1
+# else
+ set __mempcpy_niagara2, %o1
+# endif
+ ba 10f
+ nop
+1: be 1f
+ andcc %o0, HWCAP_SPARC_ULTRA3, %g0
+# ifdef SHARED
+ sethi %gdop_hix22(__mempcpy_niagara1), %o1
+ xor %o1, %gdop_lox10(__mempcpy_niagara1), %o1
+# else
+ set __mempcpy_niagara1, %o1
+# endif
+ ba 10f
+ nop
+1: be 9f
+ nop
+# ifdef SHARED
+ sethi %gdop_hix22(__mempcpy_ultra3), %o1
+ xor %o1, %gdop_lox10(__mempcpy_ultra3), %o1
+# else
+ set __mempcpy_ultra3, %o1
+# endif
+ ba 10f
+ nop
+9:
+# ifdef SHARED
+ sethi %gdop_hix22(__mempcpy_ultra1), %o1
+ xor %o1, %gdop_lox10(__mempcpy_ultra1), %o1
+# else
+ set __mempcpy_ultra1, %o1
+# endif
+10:
+# ifdef SHARED
+ add %o3, %o1, %o1
+# endif
+ retl
+ mov %o1, %o0
+END(__mempcpy)
+
+libc_hidden_builtin_def (memcpy)
+
+libc_hidden_def (__mempcpy)
+weak_alias (__mempcpy, mempcpy)
+libc_hidden_builtin_def (mempcpy)
+
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(name)
+#undef weak_alias
+#define weak_alias(x, y)
+#undef libc_hidden_def
+#define libc_hidden_def(name)
#define memcpy __memcpy_ultra1
+#define __mempcpy __mempcpy_ultra1
#endif
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S Fri Mar 30 00:01:45 2012
@@ -1,5 +1,5 @@
/* Set a block of memory to some byte value. For SUN4V Niagara.
- Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller (davem@xxxxxxxxxxxxx)
@@ -60,7 +60,7 @@
wr %g0, ASI_P, %asi
cmp %o1, 15
- bl,pn %icc, 70f
+ blu,pn %XCC, 70f
andcc %o0, 0x7, %g1
be,pt %XCC, 2f
mov 8, %g2
@@ -71,7 +71,7 @@
bne,pt %XCC, 1b
add %o0, 1, %o0
2: cmp %o1, 128
- bl,pn %icc, 60f
+ blu,pn %XCC, 60f
andcc %o0, (64 - 1), %g1
be,pt %XCC, 40f
mov 64, %g2
@@ -86,6 +86,51 @@
wr %g0, ASI_BLK_INIT_QUAD_LDD_P, %asi
andn %o1, (64 - 1), %g1
sub %o1, %g1, %o1
+
+ andn %g1, (256 - 1), %g2
+ brz,pt %g2, 50f
+ and %g1, (256 - 1), %g1
+
+45:
+ stxa %o2, [%o0 + 0x00] %asi
+ stxa %o2, [%o0 + 0x08] %asi
+ stxa %o2, [%o0 + 0x10] %asi
+ stxa %o2, [%o0 + 0x18] %asi
+ stxa %o2, [%o0 + 0x20] %asi
+ stxa %o2, [%o0 + 0x28] %asi
+ stxa %o2, [%o0 + 0x30] %asi
+ stxa %o2, [%o0 + 0x38] %asi
+ stxa %o2, [%o0 + 0x40] %asi
+ stxa %o2, [%o0 + 0x48] %asi
+ stxa %o2, [%o0 + 0x50] %asi
+ stxa %o2, [%o0 + 0x58] %asi
+ stxa %o2, [%o0 + 0x60] %asi
+ stxa %o2, [%o0 + 0x68] %asi
+ stxa %o2, [%o0 + 0x70] %asi
+ stxa %o2, [%o0 + 0x78] %asi
+ stxa %o2, [%o0 + 0x80] %asi
+ stxa %o2, [%o0 + 0x88] %asi
+ stxa %o2, [%o0 + 0x90] %asi
+ stxa %o2, [%o0 + 0x98] %asi
+ stxa %o2, [%o0 + 0xa0] %asi
+ stxa %o2, [%o0 + 0xa8] %asi
+ stxa %o2, [%o0 + 0xb0] %asi
+ stxa %o2, [%o0 + 0xb8] %asi
+ stxa %o2, [%o0 + 0xc0] %asi
+ stxa %o2, [%o0 + 0xc8] %asi
+ stxa %o2, [%o0 + 0xd0] %asi
+ stxa %o2, [%o0 + 0xd8] %asi
+ stxa %o2, [%o0 + 0xe0] %asi
+ stxa %o2, [%o0 + 0xe8] %asi
+ stxa %o2, [%o0 + 0xf0] %asi
+ stxa %o2, [%o0 + 0xf8] %asi
+ subcc %g2, 256, %g2
+ bne,pt %XCC, 45b
+ add %o0, 256, %o0
+
+ brz,pn %g1, 55f
+ nop
+
50:
stxa %o2, [%o0 + 0x00] %asi
stxa %o2, [%o0 + 0x08] %asi
@@ -99,6 +144,7 @@
bne,pt %XCC, 50b
add %o0, 64, %o0
+55:
wr %g0, ASI_P, %asi
brz,pn %o1, 80f
60:
@@ -115,7 +161,7 @@
70:
1: stba %o2, [%o0 + 0x00] %asi
subcc %o1, 1, %o1
- bne,pt %icc, 1b
+ bne,pt %XCC, 1b
add %o0, 1, %o0
/* fallthrough */
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 Fri Mar 30 00:01:45 2012
@@ -1,5 +1,5 @@
/* Multiple versions of memset and bzero
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
Contributed by David S. Miller (davem@xxxxxxxxxxxxx)
This file is part of the GNU C Library.
@@ -88,10 +88,10 @@
# undef weak_alias
# define weak_alias(a, b)
-# undef libc_hidden_builtin_def
-/* IFUNC doesn't work with the hidden functions in a shared library. */
-# define libc_hidden_builtin_def(name) \
- .globl __GI_memset; __GI_memset = __memset_ultra1
+libc_hidden_builtin_def (memset)
+
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(name)
#define memset __memset_ultra1
#define __bzero __bzero_ultra1
Added: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/rtld-memcpy.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/rtld-memcpy.c (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/rtld-memcpy.c Fri Mar 30 00:01:45 2012
@@ -1,0 +1,1 @@
+#include "../rtld-memcpy.c"
Added: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/rtld-memset.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/rtld-memset.c (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/rtld-memset.c Fri Mar 30 00:01:45 2012
@@ -1,0 +1,1 @@
+#include "../rtld-memset.c"
Added: fsf/trunk/libc/sysdeps/sparc/sparc64/rtld-memcpy.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/rtld-memcpy.c (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/rtld-memcpy.c Fri Mar 30 00:01:45 2012
@@ -1,0 +1,2 @@
+#include <string/memcpy.c>
+#include <string/mempcpy.c>
Added: fsf/trunk/libc/sysdeps/sparc/sparc64/rtld-memset.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/rtld-memset.c (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/rtld-memset.c Fri Mar 30 00:01:45 2012
@@ -1,0 +1,1 @@
+#include <string/memset.c>
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits