From: Ulrich Drepper Date: Mon, 1 Jun 2009 06:46:42 +0000 (-0700) Subject: Fix up sched_cpucount in x86-64. X-Git-Tag: fedora/glibc-2.10.90-1~8^2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ea237293664aed37ab77d53604b01e01bb7ec6f;p=thirdparty%2Fglibc.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. --- diff --git a/ChangeLog b/ChangeLog index 65a9fb7b558..6355577d8ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-31 Ulrich Drepper + + * sysdeps/x86_64/multiarch/sched_cpucount.c: Also use optimized code + for !SHARED. + 2009-05-29 H.J. Lu * csu/elf-init.c: Include and if LIBC_NONSHARED diff --git a/sysdeps/x86_64/multiarch/sched_cpucount.c b/sysdeps/x86_64/multiarch/sched_cpucount.c index e7f9daed051..b6f425e9489 100644 --- a/sysdeps/x86_64/multiarch/sched_cpucount.c +++ b/sysdeps/x86_64/multiarch/sched_cpucount.c @@ -18,24 +18,20 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifdef SHARED -# include -# include "init-arch.h" +#include +#include "init-arch.h" -# define __sched_cpucount static generic_cpucount -# include -# undef __sched_cpucount +#define __sched_cpucount static generic_cpucount +#include +#undef __sched_cpucount -# define POPCNT(l) \ +#define POPCNT(l) \ ({ __cpu_mask r; \ asm ("popcntq %1, %0" : "=r" (r) : "0" (l));\ r; }) -# define __sched_cpucount static popcount_cpucount -# include -# undef __sched_cpucount +#define __sched_cpucount static popcount_cpucount +#include +#undef __sched_cpucount libc_ifunc (__sched_cpucount, HAS_POPCOUNT ? popcount_cpucount : generic_cpucount); -#else -# include_next -#endif