mirror of git://sourceware.org/git/glibc.git
Fix up sched_cpucount in x86-64.
Now that static executables can handle IFUNC functions don't exclude optimization for sched_cpucount for !SHARED.
This commit is contained in:
parent
7441470835
commit
8ea2372936
|
|
@ -1,3 +1,8 @@
|
||||||
|
2009-05-31 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/x86_64/multiarch/sched_cpucount.c: Also use optimized code
|
||||||
|
for !SHARED.
|
||||||
|
|
||||||
2009-05-29 H.J. Lu <hongjiu.lu@intel.com>
|
2009-05-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* csu/elf-init.c: Include <link.h> and <dl-irel.h> if LIBC_NONSHARED
|
* csu/elf-init.c: Include <link.h> and <dl-irel.h> if LIBC_NONSHARED
|
||||||
|
|
|
||||||
|
|
@ -18,24 +18,20 @@
|
||||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
02111-1307 USA. */
|
02111-1307 USA. */
|
||||||
|
|
||||||
#ifdef SHARED
|
#include <sched.h>
|
||||||
# include <sched.h>
|
#include "init-arch.h"
|
||||||
# include "init-arch.h"
|
|
||||||
|
|
||||||
# define __sched_cpucount static generic_cpucount
|
#define __sched_cpucount static generic_cpucount
|
||||||
# include <posix/sched_cpucount.c>
|
#include <posix/sched_cpucount.c>
|
||||||
# undef __sched_cpucount
|
#undef __sched_cpucount
|
||||||
|
|
||||||
# define POPCNT(l) \
|
#define POPCNT(l) \
|
||||||
({ __cpu_mask r; \
|
({ __cpu_mask r; \
|
||||||
asm ("popcntq %1, %0" : "=r" (r) : "0" (l));\
|
asm ("popcntq %1, %0" : "=r" (r) : "0" (l));\
|
||||||
r; })
|
r; })
|
||||||
# define __sched_cpucount static popcount_cpucount
|
#define __sched_cpucount static popcount_cpucount
|
||||||
# include <posix/sched_cpucount.c>
|
#include <posix/sched_cpucount.c>
|
||||||
# undef __sched_cpucount
|
#undef __sched_cpucount
|
||||||
|
|
||||||
libc_ifunc (__sched_cpucount,
|
libc_ifunc (__sched_cpucount,
|
||||||
HAS_POPCOUNT ? popcount_cpucount : generic_cpucount);
|
HAS_POPCOUNT ? popcount_cpucount : generic_cpucount);
|
||||||
#else
|
|
||||||
# include_next <sched_cpucount.c>
|
|
||||||
#endif
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue