This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.21-138-gaf96be3
- From: wilco at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 27 Feb 2015 14:47:27 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.21-138-gaf96be3
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via af96be34825586536ebcfbf5c675e795ddd3c8fa (commit)
via ddcf6798d35beca3c4eec80ea448b57fd45558f4 (commit)
from 49f476f4791ea6974a7f67bdc3251ab03822c2aa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af96be34825586536ebcfbf5c675e795ddd3c8fa
commit af96be34825586536ebcfbf5c675e795ddd3c8fa
Author: Wilco Dijkstra <wdijkstr@arm.com>
Date: Fri Feb 27 14:44:41 2015 +0000
Rather than using a C implementation of memmove, directly call memmove, which
typically has a much faster optimized implementation.
diff --git a/ChangeLog b/ChangeLog
index 6eb5290..b55d6d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2015-02-27 Wilco Dijkstra wdijkstr@arm.com
+ * string/bcopy.c (bcopy): Call memmove for performance.
+
+2015-02-27 Wilco Dijkstra wdijkstr@arm.com
+
* string/bzero.c (__bzero): Call memset for performance.
2015-02-27 John David Anglin <dave.anglin@bell.net>
diff --git a/string/bcopy.c b/string/bcopy.c
index 326478a..f74e589 100644
--- a/string/bcopy.c
+++ b/string/bcopy.c
@@ -17,12 +17,8 @@
#include <string.h>
-#define memmove bcopy
-#define rettype void
-#define RETURN(s) return
-#define a1 src
-#define a1const const
-#define a2 dest
-#define a2const
-
-#include <string/memmove.c>
+void
+bcopy (const void *src, void *dest, size_t len)
+{
+ memmove (dest, src, len);
+}
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ddcf6798d35beca3c4eec80ea448b57fd45558f4
commit ddcf6798d35beca3c4eec80ea448b57fd45558f4
Author: Wilco Dijkstra <wdijkstr@arm.com>
Date: Fri Feb 27 14:41:46 2015 +0000
Rather than using a C implementation of memset, directly call memset, which
typically has a much faster optimized implementation.
diff --git a/ChangeLog b/ChangeLog
index 3b5caa5..6eb5290 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-27 Wilco Dijkstra wdijkstr@arm.com
+
+ * string/bzero.c (__bzero): Call memset for performance.
+
2015-02-27 John David Anglin <dave.anglin@bell.net>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (__O_SYNC): Change
diff --git a/string/bzero.c b/string/bzero.c
index a0e738e..43e2b38 100644
--- a/string/bzero.c
+++ b/string/bzero.c
@@ -17,66 +17,13 @@
<http://www.gnu.org/licenses/>. */
#include <string.h>
-#include <memcopy.h>
#undef __bzero
/* Set N bytes of S to 0. */
void
-__bzero (s, len)
- void *s;
- size_t len;
+__bzero (void *s, size_t len)
{
- long int dstp = (long int) s;
- const op_t zero = 0;
-
- if (len >= 8)
- {
- size_t xlen;
-
- /* There are at least some bytes to zero. No need to test
- for LEN == 0 in this alignment loop. */
- while (dstp % OPSIZ != 0)
- {
- ((byte *) dstp)[0] = 0;
- dstp += 1;
- len -= 1;
- }
-
- /* Write 8 op_t per iteration until less than 8 op_t remain. */
- xlen = len / (OPSIZ * 8);
- while (xlen != 0)
- {
- ((op_t *) dstp)[0] = zero;
- ((op_t *) dstp)[1] = zero;
- ((op_t *) dstp)[2] = zero;
- ((op_t *) dstp)[3] = zero;
- ((op_t *) dstp)[4] = zero;
- ((op_t *) dstp)[5] = zero;
- ((op_t *) dstp)[6] = zero;
- ((op_t *) dstp)[7] = zero;
- dstp += 8 * OPSIZ;
- xlen -= 1;
- }
- len %= OPSIZ * 8;
-
- /* Write 1 op_t per iteration until less than op_t remain. */
- xlen = len / OPSIZ;
- while (xlen != 0)
- {
- ((op_t *) dstp)[0] = zero;
- dstp += OPSIZ;
- xlen -= 1;
- }
- len %= OPSIZ;
- }
-
- /* Write the last few bytes. */
- while (len != 0)
- {
- ((byte *) dstp)[0] = 0;
- dstp += 1;
- len -= 1;
- }
+ memset (s, '\0', len);
}
weak_alias (__bzero, bzero)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 +++++++
string/bcopy.c | 14 ++++--------
string/bzero.c | 57 +------------------------------------------------------
3 files changed, 15 insertions(+), 64 deletions(-)
hooks/post-receive
--
GNU C Library master sources