This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.25-36-g40b7fbf


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  40b7fbf27310d4f4a899aa2c54740dce5369ec70 (commit)
      from  3403a17fea8ccef7dc5f99553a13231acf838744 (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=40b7fbf27310d4f4a899aa2c54740dce5369ec70

commit 40b7fbf27310d4f4a899aa2c54740dce5369ec70
Author: Wilco Dijkstra <wdijkstr@arm.com>
Date:   Fri Feb 10 17:26:16 2017 +0000

    GLIBC uses strchr (s, '\0') as an idiom to find the end of a string.
    This is transformed into rawmemchr by the bits/string2.h header.
    However this is generally slower than strlen on most targets, even when
    an optimized rawmemchr implementation exists.  Since GCC7 optimizes
    strchr (s, '\0') to strlen (s) + s, the GLIBC headers should not
    transform this to rawmemchr.  As GCC recognizes strchr as a builtin,
    defining strchr as the builtin is not useful.
    
    	* string/bits/string2.h (strchr): Remove define.

diff --git a/ChangeLog b/ChangeLog
index 66dfc2b..fac0e11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-02-10  Wilco Dijkstra  <wdijkstr@arm.com>
+
+	* string/bits/string2.h (strchr): Remove define.
+
 2017-02-09  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* sysdeps/x86_64/Makefile (tests): Add tst-sse, tst-avx and
diff --git a/string/bits/string2.h b/string/bits/string2.h
index e5337be..8b138a2 100644
--- a/string/bits/string2.h
+++ b/string/bits/string2.h
@@ -58,16 +58,6 @@
 #endif
 
 
-#ifndef _HAVE_STRING_ARCH_strchr
-extern void *__rawmemchr (const void *__s, int __c);
-#  define strchr(s, c) \
-  (__extension__ (__builtin_constant_p (c) && !__builtin_constant_p (s)	      \
-		  && (c) == '\0'					      \
-		  ? (char *) __rawmemchr (s, c)				      \
-		  : __builtin_strchr (s, c)))
-#endif
-
-
 /* Copy SRC to DEST, returning pointer to final NUL byte.  */
 #ifdef __USE_GNU
 # ifndef _HAVE_STRING_ARCH_stpcpy

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog             |    4 ++++
 string/bits/string2.h |   10 ----------
 2 files changed, 4 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]