mirror of git://sourceware.org/git/glibc.git
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.
This commit is contained in:
parent
dcdae19a3f
commit
d7d08bdede
|
@ -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
|
||||
|
|
|
@ -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,6 +27,9 @@
|
|||
static inline uint64_t
|
||||
__ppc_get_timebase (void)
|
||||
{
|
||||
#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
|
||||
|
@ -43,6 +47,7 @@ __ppc_get_timebase (void)
|
|||
: "=r" (__tbu), "=r" (__tbl), "=r" (__tmp));
|
||||
return (((uint64_t) __tbu << 32) | __tbl);
|
||||
# endif /* not __powerpc64__ */
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* sys/platform/ppc.h */
|
||||
|
|
Loading…
Reference in New Issue