2011-08-11 Ulrich Drepper <drepper@gmail.com>
+ * intl/l10nflist.c: Allow architecture-specific pop function.
+ * sysdeps/x86_64/l10nflist.c: New file.
+
* intl/l10nflist.c (_nl_make_l10nflist): Use locale-independent
classification.
/* Return number of bits set in X. */
+#ifndef ARCH_POP
static int pop PARAMS ((int x));
static inline int
return x;
}
+#endif
\f
struct loaded_l10nfile *
--- /dev/null
+#ifdef __POPCNT__
+# include <popcntintrin.h>
+
+static inline unsigned int
+pop (unsigned int x)
+{
+ return _mm_popcnt_u32 (x);
+}
+# define ARCH_POP 1
+
+#endif
+
+#include <intl/l10nflist.c>