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.16-ports-merge-595-gd7d08bd


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  d7d08bdedeecf168ef58c7e2bdbb4c39c1939aba (commit)
      from  dcdae19a3f8eafb7aa597b1d5cb770db76509ec4 (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://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7d08bdedeecf168ef58c7e2bdbb4c39c1939aba

commit d7d08bdedeecf168ef58c7e2bdbb4c39c1939aba
Author: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Date:   Fri Nov 2 11:20:39 2012 -0500

    Direct __ppc_get_timebase to __builtin_ppc_get_timebase for GCC 4.8+.
    
    Adapts __ppc_get_timebase to the upcoming GCC 4.8 that provides
    __builtin_ppc_get_timebase.  Building applicationns with previous
    versions of GCC will continue to use the internal implementation.

diff --git a/ChangeLog b/ChangeLog
index 5dad3dc..d85ffee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-11-02  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
+
+	* sysdeps/powerpc/sys/platform/ppc.h (__ppc_get_timebase): Use
+	__builtin_ppc_get_timebase when building with GCC >= 4.8 instead
+	of the internal implementation.
+
 2012-11-02  Joseph Myers  <joseph@codesourcery.com>
 
 	* include/sys/syslog.h [_ISOMAC]: Disable all contents of file
diff --git a/sysdeps/powerpc/sys/platform/ppc.h b/sysdeps/powerpc/sys/platform/ppc.h
index 3780f57..58948e8 100644
--- a/sysdeps/powerpc/sys/platform/ppc.h
+++ b/sysdeps/powerpc/sys/platform/ppc.h
@@ -19,6 +19,7 @@
 #ifndef _SYS_PLATFORM_PPC_H
 #define _SYS_PLATFORM_PPC_H	1
 
+#include <features.h>
 #include <stdint.h>
 #include <bits/ppc.h>
 
@@ -26,13 +27,16 @@
 static inline uint64_t
 __ppc_get_timebase (void)
 {
-#ifdef __powerpc64__
+#if __GNUC_PREREQ (4, 8)
+  return __builtin_ppc_get_timebase ();
+#else
+# ifdef __powerpc64__
   uint64_t __tb;
   /* "volatile" is necessary here, because the user expects this assembly
      isn't moved after an optimization.  */
   __asm__ volatile ("mfspr %0, 268" : "=r" (__tb));
   return __tb;
-#else  /* not __powerpc64__ */
+# else  /* not __powerpc64__ */
   uint32_t __tbu, __tbl, __tmp; \
   __asm__ volatile ("0:\n\t"
 		    "mftbu %0\n\t"
@@ -42,7 +46,8 @@ __ppc_get_timebase (void)
 		    "bne- 0b"
 		    : "=r" (__tbu), "=r" (__tbl), "=r" (__tmp));
   return (((uint64_t) __tbu << 32) | __tbl);
-#endif  /* not __powerpc64__ */
+# endif  /* not __powerpc64__ */
+#endif
 }
 
 #endif  /* sys/platform/ppc.h */

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

Summary of changes:
 ChangeLog                          |    6 ++++++
 sysdeps/powerpc/sys/platform/ppc.h |   11 ++++++++---
 2 files changed, 14 insertions(+), 3 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]