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.19-312-gea6c92f


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  ea6c92f3be6d59736ee6183a61c538e5d1cc46f8 (commit)
      from  766c4a363d5487dde04bb5e968c3db8b383ec3c2 (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=ea6c92f3be6d59736ee6183a61c538e5d1cc46f8

commit ea6c92f3be6d59736ee6183a61c538e5d1cc46f8
Author: Yufeng Zhang <yufeng.zhang@arm.com>
Date:   Tue Apr 22 17:26:59 2014 +0100

    [AArch64] Use GCC builtins to count leading/tailing zeros.

diff --git a/ChangeLog b/ChangeLog
index 8c0f2a2..c3fa6e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-22  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+	* stdlib/longlong.h (count_leading_zeros, count_trailing_zeros)
+	(COUNT_LEADING_ZEROS_0): Define for AArch64.
+
 2014-04-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	* nptl/sysdeps/unix/sysv/linux/sem_trywait.c: Include atomic.h.
diff --git a/stdlib/longlong.h b/stdlib/longlong.h
index 10d76cf..d45dbe2 100644
--- a/stdlib/longlong.h
+++ b/stdlib/longlong.h
@@ -122,6 +122,22 @@ extern const UQItype __clz_tab[256] attribute_hidden;
 #define __AND_CLOBBER_CC , "cc"
 #endif /* __GNUC__ < 2 */
 
+#if defined (__aarch64__)
+
+#if W_TYPE_SIZE == 32
+#define count_leading_zeros(COUNT, X)	((COUNT) = __builtin_clz (X))
+#define count_trailing_zeros(COUNT, X)   ((COUNT) = __builtin_ctz (X))
+#define COUNT_LEADING_ZEROS_0 32
+#endif /* W_TYPE_SIZE == 32 */
+
+#if W_TYPE_SIZE == 64
+#define count_leading_zeros(COUNT, X)	((COUNT) = __builtin_clzll (X))
+#define count_trailing_zeros(COUNT, X)   ((COUNT) = __builtin_ctzll (X))
+#define COUNT_LEADING_ZEROS_0 64
+#endif /* W_TYPE_SIZE == 64 */
+
+#endif /* __aarch64__ */
+
 #if defined (__alpha) && W_TYPE_SIZE == 64
 #define umul_ppmm(ph, pl, m0, m1) \
   do {									\

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

Summary of changes:
 ChangeLog         |    5 +++++
 stdlib/longlong.h |   16 ++++++++++++++++
 2 files changed, 21 insertions(+), 0 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]