diff mbox series

[RFC] stdbit.h implementation

Message ID ZVOnqVoOoCiGuZLa@tucnak
State New
Headers show
Series [RFC] stdbit.h implementation | expand

Commit Message

Jakub Jelinek Nov. 14, 2023, 5 p.m. UTC
Hi!

In order to double-check the __builtin_{clz,ctz,popcount}g builtins
I've added today to GCC, I've tried to implement the C23 stdbit.h
header (but just the header, not anything further) plus a test (though,
in GCC style where it aborts on error and returns 0 otherwise) for it.

Tested with gcc 13, clang 14 and gcc trunk from today.

I assume stdc_bit_ceil* should return 1 on zero input because that is the
smallest integral power of 2 greater or equal than 0.

What isn't done:
1) uint_leastN_t, or int_leastN_t types should be defined when including
   the header, but the header just defines size_t and uintN_t, intN_t
   - either some guard around stdint.h definitions of the *least*_t types
   needs to be added, or move those into a separate helper header
2) when not using GCC 14+, the header will only support unsigned _BitInt
   with sizeof 1, 2, 4, 8 (and handle them as if it was unsigned
   char/short/int/long long), and it will not support unsigned __int128,
   nor say unsigned __int20 etc.; if needed, guess unsigned __int128
   support could be added, say with
   #ifdef __SIZEOF_INT128__
   #endif
   part which would define __extern_always_inline functions with some
   non-standard prefix not exported from glibc which would handle the
   2x sizeof (long long) cases by hand and conditionally using some
   macro add them to the macros with _Generic
3) the 70 new non-type-generic functions need to be defined somewhere
   just in case somebody takes their address; dunno if you want 70
   new (albeit mostly very small) functions added into libc.so, or if
   they should go into libc_nonshared.a given that it is unlikely
   people will actually need them (except when using non-GCC/clang/icc
   compilers or GCC older than 3.4 which added the
   __builtin_{clz,ctz,popcount}{,l,ll} builtins); in any case, I think
   glibc assumes to be compiled with non-prehistoric GCC, so e.g. the
   definitions of the __extern_always_inline functions could be very well
   also used for the out of line functions


	Jakub

Comments

Joseph Myers Nov. 14, 2023, 6:02 p.m. UTC | #1
On Tue, 14 Nov 2023, Jakub Jelinek wrote:

> In order to double-check the __builtin_{clz,ctz,popcount}g builtins
> I've added today to GCC, I've tried to implement the C23 stdbit.h
> header (but just the header, not anything further) plus a test (though,
> in GCC style where it aborts on error and returns 0 otherwise) for it.

The following is my current in-progress patch (which needs tests and 
documentation, so it's quite possible some implementations are currently 
incorrect) - including all the out-of-line implementations (defined so 
that the out-of-line function implementations use the inline macro 
implementations from the header).  It doesn't attempt to use the new 
built-in functions (or, thus, to support _BitInt).  Among my notes for 
things to cover in tests include that all macros are usable inside sizeof 
etc. outside of a function (thus, do not use ({ })) - also that 
type-specific calls have the correct implicit argument conversions, also 
that both type-specific and type-generic calls evaluate arguments exactly 
once.  I haven't tested how well-optimized code is for any of these 
implementations (type-specific or type-generic) - but if it isn't, it 
probably should be, since I think all of these are among reasonable 
options for how to express the operations in terms of the underlying 
built-in functions.

diff --git a/NEWS b/NEWS
index 139cfef1b0..954cdb999d 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,15 @@ Major new features:
   on thread stack created by pthread_create or memory allocated by
   malloc).
 
+* The <stdbit.h> header has been added from ISO C2X, with
+  stdc_leading_zeros, stdc_leading_ones, stdc_trailing_zeros,
+  stdc_trailing_ones, stdc_first_leading_zero, stdc_first_leading_one,
+  stdc_first_trailing_zero, stdc_first_trailing_one, stdc_count_zeros,
+  stdc_count_ones, stdc_has_single_bit, stdc_bit_width, stdc_bit_floor
+  and stdc_bit_ceil function families, each having functions for
+  unsigned char, unsigned short, unsigned int, unsigned long int and
+  unsigned long long int, and a type-generic macro.
+
 Deprecated and removed features, and other changes affecting compatibility:
 
 * The ldconfig program now skips file names containing ';' or ending in
diff --git a/bits/stdint-least.h b/bits/stdint-least.h
new file mode 100644
index 0000000000..74ac42f14e
--- /dev/null
+++ b/bits/stdint-least.h
@@ -0,0 +1,36 @@
+/* Define int_leastN_t and uint_leastN types.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _BITS_STDINT_LEAST_H
+#define _BITS_STDINT_LEAST_H	1
+
+#include <bits/types.h>
+
+/* Signed.  */
+typedef __int_least8_t int_least8_t;
+typedef __int_least16_t int_least16_t;
+typedef __int_least32_t int_least32_t;
+typedef __int_least64_t int_least64_t;
+
+/* Unsigned.  */
+typedef __uint_least8_t uint_least8_t;
+typedef __uint_least16_t uint_least16_t;
+typedef __uint_least32_t uint_least32_t;
+typedef __uint_least64_t uint_least64_t;
+
+#endif /* bits/stdint-least.h */
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 6af606136e..be1134be8d 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -28,6 +28,7 @@ headers := \
   bits/indirect-return.h \
   bits/monetary-ldbl.h \
   bits/stdint-intn.h \
+  bits/stdint-least.h \
   bits/stdint-uintn.h \
   bits/stdlib-bsearch.h \
   bits/stdlib-float.h \
@@ -41,6 +42,7 @@ headers := \
   fmtmsg.h \
   inttypes.h \
   monetary.h \
+  stdbit.h \
   stdint.h \
   stdlib.h \
   sys/errno.h \
@@ -115,6 +117,76 @@ routines := \
   setenv \
   srand48 \
   srand48_r \
+  stdc_bit_ceil_uc \
+  stdc_bit_ceil_ui \
+  stdc_bit_ceil_ul \
+  stdc_bit_ceil_ull \
+  stdc_bit_ceil_us \
+  stdc_bit_floor_uc \
+  stdc_bit_floor_ui \
+  stdc_bit_floor_ul \
+  stdc_bit_floor_ull \
+  stdc_bit_floor_us \
+  stdc_bit_width_uc \
+  stdc_bit_width_ui \
+  stdc_bit_width_ul \
+  stdc_bit_width_ull \
+  stdc_bit_width_us \
+  stdc_count_ones_uc \
+  stdc_count_ones_ui \
+  stdc_count_ones_ul \
+  stdc_count_ones_ull \
+  stdc_count_ones_us \
+  stdc_count_zeros_uc \
+  stdc_count_zeros_ui \
+  stdc_count_zeros_ul \
+  stdc_count_zeros_ull \
+  stdc_count_zeros_us \
+  stdc_first_leading_one_uc \
+  stdc_first_leading_one_ui \
+  stdc_first_leading_one_ul \
+  stdc_first_leading_one_ull \
+  stdc_first_leading_one_us \
+  stdc_first_leading_zero_uc \
+  stdc_first_leading_zero_ui \
+  stdc_first_leading_zero_ul \
+  stdc_first_leading_zero_ull \
+  stdc_first_leading_zero_us \
+  stdc_first_trailing_one_uc \
+  stdc_first_trailing_one_ui \
+  stdc_first_trailing_one_ul \
+  stdc_first_trailing_one_ull \
+  stdc_first_trailing_one_us \
+  stdc_first_trailing_zero_uc \
+  stdc_first_trailing_zero_ui \
+  stdc_first_trailing_zero_ul \
+  stdc_first_trailing_zero_ull \
+  stdc_first_trailing_zero_us \
+  stdc_has_single_bit_uc \
+  stdc_has_single_bit_ui \
+  stdc_has_single_bit_ul \
+  stdc_has_single_bit_ull \
+  stdc_has_single_bit_us \
+  stdc_leading_ones_uc \
+  stdc_leading_ones_ui \
+  stdc_leading_ones_ul \
+  stdc_leading_ones_ull \
+  stdc_leading_ones_us \
+  stdc_leading_zeros_uc \
+  stdc_leading_zeros_ui \
+  stdc_leading_zeros_ul \
+  stdc_leading_zeros_ull \
+  stdc_leading_zeros_us \
+  stdc_trailing_ones_uc \
+  stdc_trailing_ones_ui \
+  stdc_trailing_ones_ul \
+  stdc_trailing_ones_ull \
+  stdc_trailing_ones_us \
+  stdc_trailing_zeros_uc \
+  stdc_trailing_zeros_ui \
+  stdc_trailing_zeros_ul \
+  stdc_trailing_zeros_ull \
+  stdc_trailing_zeros_us \
   strfmon \
   strfmon_l \
   strfromd \
diff --git a/stdlib/Versions b/stdlib/Versions
index 6a861c54a1..ea2265bbd4 100644
--- a/stdlib/Versions
+++ b/stdlib/Versions
@@ -151,6 +151,78 @@ libc {
     __isoc23_strtoimax;
     __isoc23_strtoumax;
   }
+  GLIBC_2.39 {
+    stdc_leading_zeros_uc;
+    stdc_leading_zeros_us;
+    stdc_leading_zeros_ui;
+    stdc_leading_zeros_ul;
+    stdc_leading_zeros_ull;
+    stdc_leading_ones_uc;
+    stdc_leading_ones_us;
+    stdc_leading_ones_ui;
+    stdc_leading_ones_ul;
+    stdc_leading_ones_ull;
+    stdc_trailing_zeros_uc;
+    stdc_trailing_zeros_us;
+    stdc_trailing_zeros_ui;
+    stdc_trailing_zeros_ul;
+    stdc_trailing_zeros_ull;
+    stdc_trailing_ones_uc;
+    stdc_trailing_ones_us;
+    stdc_trailing_ones_ui;
+    stdc_trailing_ones_ul;
+    stdc_trailing_ones_ull;
+    stdc_first_leading_zero_uc;
+    stdc_first_leading_zero_us;
+    stdc_first_leading_zero_ui;
+    stdc_first_leading_zero_ul;
+    stdc_first_leading_zero_ull;
+    stdc_first_leading_one_uc;
+    stdc_first_leading_one_us;
+    stdc_first_leading_one_ui;
+    stdc_first_leading_one_ul;
+    stdc_first_leading_one_ull;
+    stdc_first_trailing_zero_uc;
+    stdc_first_trailing_zero_us;
+    stdc_first_trailing_zero_ui;
+    stdc_first_trailing_zero_ul;
+    stdc_first_trailing_zero_ull;
+    stdc_first_trailing_one_uc;
+    stdc_first_trailing_one_us;
+    stdc_first_trailing_one_ui;
+    stdc_first_trailing_one_ul;
+    stdc_first_trailing_one_ull;
+    stdc_count_zeros_uc;
+    stdc_count_zeros_us;
+    stdc_count_zeros_ui;
+    stdc_count_zeros_ul;
+    stdc_count_zeros_ull;
+    stdc_count_ones_uc;
+    stdc_count_ones_us;
+    stdc_count_ones_ui;
+    stdc_count_ones_ul;
+    stdc_count_ones_ull;
+    stdc_has_single_bit_uc;
+    stdc_has_single_bit_us;
+    stdc_has_single_bit_ui;
+    stdc_has_single_bit_ul;
+    stdc_has_single_bit_ull;
+    stdc_bit_width_uc;
+    stdc_bit_width_us;
+    stdc_bit_width_ui;
+    stdc_bit_width_ul;
+    stdc_bit_width_ull;
+    stdc_bit_floor_uc;
+    stdc_bit_floor_us;
+    stdc_bit_floor_ui;
+    stdc_bit_floor_ul;
+    stdc_bit_floor_ull;
+    stdc_bit_ceil_uc;
+    stdc_bit_ceil_us;
+    stdc_bit_ceil_ui;
+    stdc_bit_ceil_ul;
+    stdc_bit_ceil_ull;
+  }
   GLIBC_PRIVATE {
     # functions which have an additional interface since they are
     # are cancelable.
diff --git a/stdlib/stdbit.h b/stdlib/stdbit.h
new file mode 100644
index 0000000000..689e63b562
--- /dev/null
+++ b/stdlib/stdbit.h
@@ -0,0 +1,764 @@
+/* ISO C23 Standard: 7.18 - Bit and byte utilities <stdbit.h>.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _STDBIT_H
+#define _STDBIT_H	1
+
+#include <features.h>
+#include <bits/endian.h>
+#include <bits/stdint-intn.h>
+#include <bits/stdint-uintn.h>
+#include <bits/stdint-least.h>
+#define __need_size_t
+#include <stddef.h>
+
+#define __STDC_VERSION_STDBIT_H__	202311L
+
+#define __STDC_ENDIAN_LITTLE__		__LITTLE_ENDIAN
+#define __STDC_ENDIAN_BIG__		__BIG_ENDIAN
+#define __STDC_ENDIAN_NATIVE__		__BYTE_ORDER
+
+__BEGIN_DECLS
+
+/* Count leading zeros.  */
+extern unsigned int stdc_leading_zeros_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_leading_zeros_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_leading_zeros_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_leading_zeros_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned int stdc_leading_zeros_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_leading_zeros(x)				\
+  (stdc_leading_zeros_ull (x)				\
+   - (unsigned int) (8 * (sizeof (0ULL) - sizeof (x))))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
+static __always_inline unsigned int
+__clz64_inline (uint64_t __x)
+{
+  return __x == 0 ? 64 : __builtin_clzll (__x);
+}
+
+static __always_inline unsigned int
+__clz32_inline (uint32_t __x)
+{
+  return __x == 0 ? 32 : __builtin_clz (__x);
+}
+
+static __always_inline unsigned int
+__clz16_inline (uint16_t __x)
+{
+  return __clz32_inline (__x) - 16;
+}
+
+static __always_inline unsigned int
+__clz8_inline (uint8_t __x)
+{
+  return __clz32_inline (__x) - 24;
+}
+
+# define stdc_leading_zeros_uc(x) (__clz8_inline (x))
+# define stdc_leading_zeros_us(x) (__clz16_inline (x))
+# define stdc_leading_zeros_ui(x) (__clz32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_leading_zeros_ul(x) (__clz64_inline (x))
+# else
+#  define stdc_leading_zeros_ul(x) (__clz32_inline (x))
+# endif
+# define stdc_leading_zeros_ull(x) (__clz64_inline (x))
+#endif
+
+/* Count leading ones.  */
+extern unsigned int stdc_leading_ones_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_leading_ones_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_leading_ones_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_leading_ones_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned int stdc_leading_ones_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_leading_ones(x)					\
+  (stdc_leading_ones_ull ((unsigned long long int) (x)		\
+			  << 8 * (sizeof (0ULL) - sizeof (x))))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
+static __always_inline unsigned int
+__clo64_inline (uint64_t __x)
+{
+  return __clz64_inline (~__x);
+}
+
+static __always_inline unsigned int
+__clo32_inline (uint32_t __x)
+{
+  return __clz32_inline (~__x);
+}
+
+static __always_inline unsigned int
+__clo16_inline (uint16_t __x)
+{
+  return __clz16_inline (~__x);
+}
+
+static __always_inline unsigned int
+__clo8_inline (uint8_t __x)
+{
+  return __clz8_inline (~__x);
+}
+
+# define stdc_leading_ones_uc(x) (__clo8_inline (x))
+# define stdc_leading_ones_us(x) (__clo16_inline (x))
+# define stdc_leading_ones_ui(x) (__clo32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_leading_ones_ul(x) (__clo64_inline (x))
+# else
+#  define stdc_leading_ones_ul(x) (__clo32_inline (x))
+# endif
+# define stdc_leading_ones_ull(x) (__clo64_inline (x))
+#endif
+
+/* Count trailing zeros.  */
+extern unsigned int stdc_trailing_zeros_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_trailing_zeros_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_trailing_zeros_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_trailing_zeros_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned int stdc_trailing_zeros_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_trailing_zeros(x)				\
+  (sizeof (x) == 8 ? stdc_trailing_zeros_ull (x)	\
+   : sizeof (x) == 4 ? stdc_trailing_zeros_ui (x)	\
+   : sizeof (x) == 2 ? stdc_trailing_zeros_us (x)	\
+   : stdc_trailing_zeros_uc (x))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
+static __always_inline unsigned int
+__ctz64_inline (uint64_t __x)
+{
+  return __x == 0 ? 64 : __builtin_ctzll (__x);
+}
+
+static __always_inline unsigned int
+__ctz32_inline (uint32_t __x)
+{
+  return __x == 0 ? 32 : __builtin_ctz (__x);
+}
+
+static __always_inline unsigned int
+__ctz16_inline (uint16_t __x)
+{
+  return __ctz32_inline (__x) - 16;
+}
+
+static __always_inline unsigned int
+__ctz8_inline (uint8_t __x)
+{
+  return __ctz32_inline (__x) - 24;
+}
+
+# define stdc_trailing_zeros_uc(x) (__ctz8_inline (x))
+# define stdc_trailing_zeros_us(x) (__ctz16_inline (x))
+# define stdc_trailing_zeros_ui(x) (__ctz32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_trailing_zeros_ul(x) (__ctz64_inline (x))
+# else
+#  define stdc_trailing_zeros_ul(x) (__ctz32_inline (x))
+# endif
+# define stdc_trailing_zeros_ull(x) (__ctz64_inline (x))
+#endif
+
+/* Count trailing ones.  */
+extern unsigned int stdc_trailing_ones_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_trailing_ones_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_trailing_ones_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_trailing_ones_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned int stdc_trailing_ones_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_trailing_ones(x) (stdc_trailing_ones_ull (x))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
+static __always_inline unsigned int
+__cto64_inline (uint64_t __x)
+{
+  return __ctz64_inline (~__x);
+}
+
+static __always_inline unsigned int
+__cto32_inline (uint32_t __x)
+{
+  return __ctz32_inline (~__x);
+}
+
+static __always_inline unsigned int
+__cto16_inline (uint16_t __x)
+{
+  return __ctz16_inline (~__x);
+}
+
+static __always_inline unsigned int
+__cto8_inline (uint8_t __x)
+{
+  return __ctz8_inline (~__x);
+}
+
+# define stdc_trailing_ones_uc(x) (__cto8_inline (x))
+# define stdc_trailing_ones_us(x) (__cto16_inline (x))
+# define stdc_trailing_ones_ui(x) (__cto32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_trailing_ones_ul(x) (__cto64_inline (x))
+# else
+#  define stdc_trailing_ones_ul(x) (__cto32_inline (x))
+# endif
+# define stdc_trailing_ones_ull(x) (__cto64_inline (x))
+#endif
+
+/* First leading zero.  */
+extern unsigned int stdc_first_leading_zero_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_leading_zero_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_leading_zero_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_leading_zero_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned int stdc_first_leading_zero_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_first_leading_zero(x)			\
+  (sizeof (x) == 8 ? stdc_first_leading_zero_ull (x)	\
+   : sizeof (x) == 4 ? stdc_first_leading_zero_ui (x)	\
+   : sizeof (x) == 2 ? stdc_first_leading_zero_us (x)	\
+   : stdc_first_leading_zero_uc (x))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
+static __always_inline unsigned int
+__flz64_inline (uint64_t __x)
+{
+  return __x == (uint64_t) -1 ? 0 : 1 + __clo64_inline (__x);
+}
+
+static __always_inline unsigned int
+__flz32_inline (uint32_t __x)
+{
+  return __x == (uint32_t) -1 ? 0 : 1 + __clo32_inline (__x);
+}
+
+static __always_inline unsigned int
+__flz16_inline (uint16_t __x)
+{
+  return __x == (uint16_t) -1 ? 0 : 1 + __clo16_inline (__x);
+}
+
+static __always_inline unsigned int
+__flz8_inline (uint8_t __x)
+{
+  return __x == (uint8_t) -1 ? 0 : 1 + __clo8_inline (__x);
+}
+
+# define stdc_first_leading_zero_uc(x) (__flz8_inline (x))
+# define stdc_first_leading_zero_us(x) (__flz16_inline (x))
+# define stdc_first_leading_zero_ui(x) (__flz32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_first_leading_zero_ul(x) (__flz64_inline (x))
+# else
+#  define stdc_first_leading_zero_ul(x) (__flz32_inline (x))
+# endif
+# define stdc_first_leading_zero_ull(x) (__flz64_inline (x))
+#endif
+
+/* First leading one.  */
+extern unsigned int stdc_first_leading_one_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_leading_one_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_leading_one_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_leading_one_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned int stdc_first_leading_one_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_first_leading_one(x)			\
+  (sizeof (x) == 8 ? stdc_first_leading_one_ull (x)	\
+   : sizeof (x) == 4 ? stdc_first_leading_one_ui (x)	\
+   : sizeof (x) == 2 ? stdc_first_leading_one_us (x)	\
+   : stdc_first_leading_one_uc (x))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
+static __always_inline unsigned int
+__flo64_inline (uint64_t __x)
+{
+  return __x == 0 ? 0 : 1 + __clz64_inline (__x);
+}
+
+static __always_inline unsigned int
+__flo32_inline (uint32_t __x)
+{
+  return __x == 0 ? 0 : 1 + __clz32_inline (__x);
+}
+
+static __always_inline unsigned int
+__flo16_inline (uint16_t __x)
+{
+  return __x == 0 ? 0 : 1 + __clz16_inline (__x);
+}
+
+static __always_inline unsigned int
+__flo8_inline (uint8_t __x)
+{
+  return __x == 0 ? 0 : 1 + __clz8_inline (__x);
+}
+
+# define stdc_first_leading_one_uc(x) (__flo8_inline (x))
+# define stdc_first_leading_one_us(x) (__flo16_inline (x))
+# define stdc_first_leading_one_ui(x) (__flo32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_first_leading_one_ul(x) (__flo64_inline (x))
+# else
+#  define stdc_first_leading_one_ul(x) (__flo32_inline (x))
+# endif
+# define stdc_first_leading_one_ull(x) (__flo64_inline (x))
+#endif
+
+/* First trailing zero.  */
+extern unsigned int stdc_first_trailing_zero_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_trailing_zero_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_trailing_zero_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_trailing_zero_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned int stdc_first_trailing_zero_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_first_trailing_zero(x)			\
+  (sizeof (x) == 8 ? stdc_first_trailing_zero_ull (x)	\
+   : sizeof (x) == 4 ? stdc_first_trailing_zero_ui (x)	\
+   : sizeof (x) == 2 ? stdc_first_trailing_zero_us (x)	\
+   : stdc_first_trailing_zero_uc (x))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
+static __always_inline unsigned int
+__ftz64_inline (uint64_t __x)
+{
+  return __x == (uint64_t) -1 ? 0 : 1 + __cto64_inline (__x);
+}
+
+static __always_inline unsigned int
+__ftz32_inline (uint32_t __x)
+{
+  return __x == (uint32_t) -1 ? 0 : 1 + __cto32_inline (__x);
+}
+
+static __always_inline unsigned int
+__ftz16_inline (uint16_t __x)
+{
+  return __x == (uint16_t) -1 ? 0 : 1 + __cto16_inline (__x);
+}
+
+static __always_inline unsigned int
+__ftz8_inline (uint8_t __x)
+{
+  return __x == (uint8_t) -1 ? 0 : 1 + __cto8_inline (__x);
+}
+
+# define stdc_first_trailing_zero_uc(x) (__ftz8_inline (x))
+# define stdc_first_trailing_zero_us(x) (__ftz16_inline (x))
+# define stdc_first_trailing_zero_ui(x) (__ftz32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_first_trailing_zero_ul(x) (__ftz64_inline (x))
+# else
+#  define stdc_first_trailing_zero_ul(x) (__ftz32_inline (x))
+# endif
+# define stdc_first_trailing_zero_ull(x) (__ftz64_inline (x))
+#endif
+
+/* First trailing one.  */
+extern unsigned int stdc_first_trailing_one_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_trailing_one_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_trailing_one_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_first_trailing_one_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned int stdc_first_trailing_one_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_first_trailing_one(x)			\
+  (sizeof (x) == 8 ? stdc_first_trailing_one_ull (x)	\
+   : sizeof (x) == 4 ? stdc_first_trailing_one_ui (x)	\
+   : sizeof (x) == 2 ? stdc_first_trailing_one_us (x)	\
+   : stdc_first_trailing_one_uc (x))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
+static __always_inline unsigned int
+__fto64_inline (uint64_t __x)
+{
+  return __x == 0 ? 0 : 1 + __ctz64_inline (__x);
+}
+
+static __always_inline unsigned int
+__fto32_inline (uint32_t __x)
+{
+  return __x == 0 ? 0 : 1 + __ctz32_inline (__x);
+}
+
+static __always_inline unsigned int
+__fto16_inline (uint16_t __x)
+{
+  return __x == 0 ? 0 : 1 + __ctz16_inline (__x);
+}
+
+static __always_inline unsigned int
+__fto8_inline (uint8_t __x)
+{
+  return __x == 0 ? 0 : 1 + __ctz8_inline (__x);
+}
+
+# define stdc_first_trailing_one_uc(x) (__fto8_inline (x))
+# define stdc_first_trailing_one_us(x) (__fto16_inline (x))
+# define stdc_first_trailing_one_ui(x) (__fto32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_first_trailing_one_ul(x) (__fto64_inline (x))
+# else
+#  define stdc_first_trailing_one_ul(x) (__fto32_inline (x))
+# endif
+# define stdc_first_trailing_one_ull(x) (__fto64_inline (x))
+#endif
+
+/* Count zeros.  */
+extern unsigned int stdc_count_zeros_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_count_zeros_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_count_zeros_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_count_zeros_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned int stdc_count_zeros_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_count_zeros(x)				\
+  (stdc_count_zeros_ull (x)				\
+   - (unsigned int) (8 * (sizeof (0ULL) - sizeof (x))))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_popcountll)
+static __always_inline unsigned int
+__cz64_inline (uint64_t __x)
+{
+  return 64 - __builtin_popcountll (__x);
+}
+
+static __always_inline unsigned int
+__cz32_inline (uint32_t __x)
+{
+  return 32 - __builtin_popcount (__x);
+}
+
+static __always_inline unsigned int
+__cz16_inline (uint16_t __x)
+{
+  return 16 - __builtin_popcount (__x);
+}
+
+static __always_inline unsigned int
+__cz8_inline (uint8_t __x)
+{
+  return 8 - __builtin_popcount (__x);
+}
+
+# define stdc_count_zeros_uc(x) (__cz8_inline (x))
+# define stdc_count_zeros_us(x) (__cz16_inline (x))
+# define stdc_count_zeros_ui(x) (__cz32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_count_zeros_ul(x) (__cz64_inline (x))
+# else
+#  define stdc_count_zeros_ul(x) (__cz32_inline (x))
+# endif
+# define stdc_count_zeros_ull(x) (__cz64_inline (x))
+#endif
+
+/* Count ones.  */
+extern unsigned int stdc_count_ones_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_count_ones_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_count_ones_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_count_ones_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned int stdc_count_ones_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_count_ones(x) (stdc_count_ones_ull (x))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_popcountll)
+static __always_inline unsigned int
+__co64_inline (uint64_t __x)
+{
+  return __builtin_popcountll (__x);
+}
+
+static __always_inline unsigned int
+__co32_inline (uint32_t __x)
+{
+  return __builtin_popcount (__x);
+}
+
+static __always_inline unsigned int
+__co16_inline (uint16_t __x)
+{
+  return __builtin_popcount (__x);
+}
+
+static __always_inline unsigned int
+__co8_inline (uint8_t __x)
+{
+  return __builtin_popcount (__x);
+}
+
+# define stdc_count_ones_uc(x) (__co8_inline (x))
+# define stdc_count_ones_us(x) (__co16_inline (x))
+# define stdc_count_ones_ui(x) (__co32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_count_ones_ul(x) (__co64_inline (x))
+# else
+#  define stdc_count_ones_ul(x) (__co32_inline (x))
+# endif
+# define stdc_count_ones_ull(x) (__co64_inline (x))
+#endif
+
+/* Single-bit check.  */
+extern _Bool stdc_has_single_bit_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern _Bool stdc_has_single_bit_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern _Bool stdc_has_single_bit_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern _Bool stdc_has_single_bit_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern _Bool stdc_has_single_bit_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_has_single_bit(x) (stdc_has_single_bit_ull (x))
+
+static __always_inline _Bool
+__hsb64_inline (uint64_t __x)
+{
+  return __x == (__x & -__x) && __x != 0;
+}
+
+static __always_inline _Bool
+__hsb32_inline (uint32_t __x)
+{
+  return __x == (__x & -__x) && __x != 0;
+}
+
+static __always_inline _Bool
+__hsb16_inline (uint16_t __x)
+{
+  return __x == (__x & -__x) && __x != 0;
+}
+
+static __always_inline _Bool
+__hsb8_inline (uint8_t __x)
+{
+  return __x == (__x & -__x) && __x != 0;
+}
+
+#define stdc_has_single_bit_uc(x) (__hsb8_inline (x))
+#define stdc_has_single_bit_us(x) (__hsb16_inline (x))
+#define stdc_has_single_bit_ui(x) (__hsb32_inline (x))
+#if __WORDSIZE == 64
+# define stdc_has_single_bit_ul(x) (__hsb64_inline (x))
+#else
+# define stdc_has_single_bit_ul(x) (__hsb32_inline (x))
+#endif
+#define stdc_has_single_bit_ull(x) (__hsb64_inline (x))
+
+/* Bit width.  */
+extern unsigned int stdc_bit_width_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_bit_width_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_bit_width_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_bit_width_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned int stdc_bit_width_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_bit_width(x) (stdc_bit_width_ull (x))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
+static __always_inline unsigned int
+__bw64_inline (uint64_t __x)
+{
+  return 64 - __clz64_inline (__x);
+}
+
+static __always_inline unsigned int
+__bw32_inline (uint32_t __x)
+{
+  return 32 - __clz32_inline (__x);
+}
+
+static __always_inline unsigned int
+__bw16_inline (uint16_t __x)
+{
+  return 16 - __clz16_inline (__x);
+}
+
+static __always_inline unsigned int
+__bw8_inline (uint8_t __x)
+{
+  return 8 - __clz8_inline (__x);
+}
+
+# define stdc_bit_width_uc(x) (__bw8_inline (x))
+# define stdc_bit_width_us(x) (__bw16_inline (x))
+# define stdc_bit_width_ui(x) (__bw32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_bit_width_ul(x) (__bw64_inline (x))
+# else
+#  define stdc_bit_width_ul(x) (__bw32_inline (x))
+# endif
+# define stdc_bit_width_ull(x) (__bw64_inline (x))
+#endif
+
+/* Bit floor.  */
+extern unsigned char stdc_bit_floor_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned short stdc_bit_floor_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_bit_floor_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned long int stdc_bit_floor_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned long long int stdc_bit_floor_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_bit_floor(x) ((__typeof (x)) stdc_bit_floor_ull (x))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
+static __always_inline uint64_t
+__bf64_inline (uint64_t __x)
+{
+  return __x == 0 ? 0 : ((uint64_t) 1) << (__bw64_inline (__x) - 1);
+}
+
+static __always_inline uint32_t
+__bf32_inline (uint32_t __x)
+{
+  return __x == 0 ? 0 : ((uint32_t) 1) << (__bw32_inline (__x) - 1);
+}
+
+static __always_inline uint16_t
+__bf16_inline (uint16_t __x)
+{
+  return __x == 0 ? 0 : ((uint16_t) 1) << (__bw16_inline (__x) - 1);
+}
+
+static __always_inline uint8_t
+__bf8_inline (uint8_t __x)
+{
+  return __x == 0 ? 0 : ((uint8_t) 1) << (__bw8_inline (__x) - 1);
+}
+
+# define stdc_bit_floor_uc(x) ((unsigned char) __bf8_inline (x))
+# define stdc_bit_floor_us(x) ((unsigned short) __bf16_inline (x))
+# define stdc_bit_floor_ui(x) ((unsigned int) __bf32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_bit_floor_ul(x) ((unsigned long int) __bf64_inline (x))
+# else
+#  define stdc_bit_floor_ul(x) ((unsigned long int) __bf32_inline (x))
+# endif
+# define stdc_bit_floor_ull(x) ((unsigned long long int) __bf64_inline (x))
+#endif
+
+/* Bit ceiling.  */
+extern unsigned char stdc_bit_ceil_uc (unsigned char __x)
+     __THROW __attribute_const__;
+extern unsigned short stdc_bit_ceil_us (unsigned short __x)
+     __THROW __attribute_const__;
+extern unsigned int stdc_bit_ceil_ui (unsigned int __x)
+     __THROW __attribute_const__;
+extern unsigned long int stdc_bit_ceil_ul (unsigned long int __x)
+     __THROW __attribute_const__;
+__extension__
+extern unsigned long long int stdc_bit_ceil_ull (unsigned long long int __x)
+     __THROW __attribute_const__;
+#define stdc_bit_ceil(x) ((__typeof (x)) stdc_bit_ceil_ull (x))
+
+#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
+static __always_inline uint64_t
+__bc64_inline (uint64_t __x)
+{
+  return __x <= 1 ? 1 : ((uint64_t) 1) << (__bw64_inline (__x - 1) - 1) << 1;
+}
+
+static __always_inline uint32_t
+__bc32_inline (uint32_t __x)
+{
+  return __x <= 1 ? 1 : ((uint32_t) 1) << (__bw32_inline (__x - 1) - 1) << 1;
+}
+
+static __always_inline uint16_t
+__bc16_inline (uint16_t __x)
+{
+  return __x <= 1 ? 1 : ((uint16_t) 1) << (__bw16_inline (__x - 1) - 1) << 1;
+}
+
+static __always_inline uint8_t
+__bc8_inline (uint8_t __x)
+{
+  return __x <= 1 ? 1 : ((uint8_t) 1) << (__bw8_inline (__x - 1) - 1) << 1;
+}
+
+# define stdc_bit_ceil_uc(x) ((unsigned char) __bc8_inline (x))
+# define stdc_bit_ceil_us(x) ((unsigned short) __bc16_inline (x))
+# define stdc_bit_ceil_ui(x) ((unsigned int) __bc32_inline (x))
+# if __WORDSIZE == 64
+#  define stdc_bit_ceil_ul(x) ((unsigned long int) __bc64_inline (x))
+# else
+#  define stdc_bit_ceil_ul(x) ((unsigned long int) __bc32_inline (x))
+# endif
+# define stdc_bit_ceil_ull(x) ((unsigned long long int) __bc64_inline (x))
+#endif
+
+__END_DECLS
+
+#endif /* _THREADS_H */
diff --git a/stdlib/stdc_bit_ceil_uc.c b/stdlib/stdc_bit_ceil_uc.c
new file mode 100644
index 0000000000..1252829fd2
--- /dev/null
+++ b/stdlib/stdc_bit_ceil_uc.c
@@ -0,0 +1,25 @@
+/* Bit ceiling for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned char
+(stdc_bit_ceil_uc) (unsigned char x)
+{
+  return stdc_bit_ceil_uc (x);
+}
diff --git a/stdlib/stdc_bit_ceil_ui.c b/stdlib/stdc_bit_ceil_ui.c
new file mode 100644
index 0000000000..25f552d8db
--- /dev/null
+++ b/stdlib/stdc_bit_ceil_ui.c
@@ -0,0 +1,25 @@
+/* Bit ceiling for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_bit_ceil_ui) (unsigned int x)
+{
+  return stdc_bit_ceil_ui (x);
+}
diff --git a/stdlib/stdc_bit_ceil_ul.c b/stdlib/stdc_bit_ceil_ul.c
new file mode 100644
index 0000000000..1897080f96
--- /dev/null
+++ b/stdlib/stdc_bit_ceil_ul.c
@@ -0,0 +1,25 @@
+/* Bit ceiling for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned long int
+(stdc_bit_ceil_ul) (unsigned long int x)
+{
+  return stdc_bit_ceil_ul (x);
+}
diff --git a/stdlib/stdc_bit_ceil_ull.c b/stdlib/stdc_bit_ceil_ull.c
new file mode 100644
index 0000000000..2990dadaec
--- /dev/null
+++ b/stdlib/stdc_bit_ceil_ull.c
@@ -0,0 +1,25 @@
+/* Bit ceiling for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned long long int
+(stdc_bit_ceil_ull) (unsigned long long int x)
+{
+  return stdc_bit_ceil_ull (x);
+}
diff --git a/stdlib/stdc_bit_ceil_us.c b/stdlib/stdc_bit_ceil_us.c
new file mode 100644
index 0000000000..9db0665ff6
--- /dev/null
+++ b/stdlib/stdc_bit_ceil_us.c
@@ -0,0 +1,25 @@
+/* Bit ceiling for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned short
+(stdc_bit_ceil_us) (unsigned short x)
+{
+  return stdc_bit_ceil_us (x);
+}
diff --git a/stdlib/stdc_bit_floor_uc.c b/stdlib/stdc_bit_floor_uc.c
new file mode 100644
index 0000000000..4c313ef866
--- /dev/null
+++ b/stdlib/stdc_bit_floor_uc.c
@@ -0,0 +1,25 @@
+/* Bit floor for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned char
+(stdc_bit_floor_uc) (unsigned char x)
+{
+  return stdc_bit_floor_uc (x);
+}
diff --git a/stdlib/stdc_bit_floor_ui.c b/stdlib/stdc_bit_floor_ui.c
new file mode 100644
index 0000000000..3daa47c820
--- /dev/null
+++ b/stdlib/stdc_bit_floor_ui.c
@@ -0,0 +1,25 @@
+/* Bit floor for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_bit_floor_ui) (unsigned int x)
+{
+  return stdc_bit_floor_ui (x);
+}
diff --git a/stdlib/stdc_bit_floor_ul.c b/stdlib/stdc_bit_floor_ul.c
new file mode 100644
index 0000000000..a9eb7682db
--- /dev/null
+++ b/stdlib/stdc_bit_floor_ul.c
@@ -0,0 +1,25 @@
+/* Bit floor for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned long int
+(stdc_bit_floor_ul) (unsigned long int x)
+{
+  return stdc_bit_floor_ul (x);
+}
diff --git a/stdlib/stdc_bit_floor_ull.c b/stdlib/stdc_bit_floor_ull.c
new file mode 100644
index 0000000000..0c2d3d9d96
--- /dev/null
+++ b/stdlib/stdc_bit_floor_ull.c
@@ -0,0 +1,25 @@
+/* Bit floor for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned long long int
+(stdc_bit_floor_ull) (unsigned long long int x)
+{
+  return stdc_bit_floor_ull (x);
+}
diff --git a/stdlib/stdc_bit_floor_us.c b/stdlib/stdc_bit_floor_us.c
new file mode 100644
index 0000000000..3d2654ffb5
--- /dev/null
+++ b/stdlib/stdc_bit_floor_us.c
@@ -0,0 +1,25 @@
+/* Bit floor for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned short
+(stdc_bit_floor_us) (unsigned short x)
+{
+  return stdc_bit_floor_us (x);
+}
diff --git a/stdlib/stdc_bit_width_uc.c b/stdlib/stdc_bit_width_uc.c
new file mode 100644
index 0000000000..909699cd52
--- /dev/null
+++ b/stdlib/stdc_bit_width_uc.c
@@ -0,0 +1,25 @@
+/* Bit width for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_bit_width_uc) (unsigned char x)
+{
+  return stdc_bit_width_uc (x);
+}
diff --git a/stdlib/stdc_bit_width_ui.c b/stdlib/stdc_bit_width_ui.c
new file mode 100644
index 0000000000..36def9ba64
--- /dev/null
+++ b/stdlib/stdc_bit_width_ui.c
@@ -0,0 +1,25 @@
+/* Bit width for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_bit_width_ui) (unsigned int x)
+{
+  return stdc_bit_width_ui (x);
+}
diff --git a/stdlib/stdc_bit_width_ul.c b/stdlib/stdc_bit_width_ul.c
new file mode 100644
index 0000000000..ef727cef1f
--- /dev/null
+++ b/stdlib/stdc_bit_width_ul.c
@@ -0,0 +1,25 @@
+/* Bit width for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_bit_width_ul) (unsigned long int x)
+{
+  return stdc_bit_width_ul (x);
+}
diff --git a/stdlib/stdc_bit_width_ull.c b/stdlib/stdc_bit_width_ull.c
new file mode 100644
index 0000000000..58357449b0
--- /dev/null
+++ b/stdlib/stdc_bit_width_ull.c
@@ -0,0 +1,25 @@
+/* Bit width for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_bit_width_ull) (unsigned long long int x)
+{
+  return stdc_bit_width_ull (x);
+}
diff --git a/stdlib/stdc_bit_width_us.c b/stdlib/stdc_bit_width_us.c
new file mode 100644
index 0000000000..7a3750b5da
--- /dev/null
+++ b/stdlib/stdc_bit_width_us.c
@@ -0,0 +1,25 @@
+/* Bit width for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_bit_width_us) (unsigned short x)
+{
+  return stdc_bit_width_us (x);
+}
diff --git a/stdlib/stdc_count_ones_uc.c b/stdlib/stdc_count_ones_uc.c
new file mode 100644
index 0000000000..b7f4bf5246
--- /dev/null
+++ b/stdlib/stdc_count_ones_uc.c
@@ -0,0 +1,25 @@
+/* Count ones for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_count_ones_uc) (unsigned char x)
+{
+  return stdc_count_ones_uc (x);
+}
diff --git a/stdlib/stdc_count_ones_ui.c b/stdlib/stdc_count_ones_ui.c
new file mode 100644
index 0000000000..63e88ae651
--- /dev/null
+++ b/stdlib/stdc_count_ones_ui.c
@@ -0,0 +1,25 @@
+/* Count ones for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_count_ones_ui) (unsigned int x)
+{
+  return stdc_count_ones_ui (x);
+}
diff --git a/stdlib/stdc_count_ones_ul.c b/stdlib/stdc_count_ones_ul.c
new file mode 100644
index 0000000000..6ae7e0b785
--- /dev/null
+++ b/stdlib/stdc_count_ones_ul.c
@@ -0,0 +1,25 @@
+/* Count ones for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_count_ones_ul) (unsigned long int x)
+{
+  return stdc_count_ones_ul (x);
+}
diff --git a/stdlib/stdc_count_ones_ull.c b/stdlib/stdc_count_ones_ull.c
new file mode 100644
index 0000000000..89a67c65be
--- /dev/null
+++ b/stdlib/stdc_count_ones_ull.c
@@ -0,0 +1,25 @@
+/* Count ones for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_count_ones_ull) (unsigned long long int x)
+{
+  return stdc_count_ones_ull (x);
+}
diff --git a/stdlib/stdc_count_ones_us.c b/stdlib/stdc_count_ones_us.c
new file mode 100644
index 0000000000..f15babfc56
--- /dev/null
+++ b/stdlib/stdc_count_ones_us.c
@@ -0,0 +1,25 @@
+/* Count ones for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_count_ones_us) (unsigned short x)
+{
+  return stdc_count_ones_us (x);
+}
diff --git a/stdlib/stdc_count_zeros_uc.c b/stdlib/stdc_count_zeros_uc.c
new file mode 100644
index 0000000000..d797a3ad73
--- /dev/null
+++ b/stdlib/stdc_count_zeros_uc.c
@@ -0,0 +1,25 @@
+/* Count zeros for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_count_zeros_uc) (unsigned char x)
+{
+  return stdc_count_zeros_uc (x);
+}
diff --git a/stdlib/stdc_count_zeros_ui.c b/stdlib/stdc_count_zeros_ui.c
new file mode 100644
index 0000000000..7e5cd165f0
--- /dev/null
+++ b/stdlib/stdc_count_zeros_ui.c
@@ -0,0 +1,25 @@
+/* Count zeros for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_count_zeros_ui) (unsigned int x)
+{
+  return stdc_count_zeros_ui (x);
+}
diff --git a/stdlib/stdc_count_zeros_ul.c b/stdlib/stdc_count_zeros_ul.c
new file mode 100644
index 0000000000..24ea71f602
--- /dev/null
+++ b/stdlib/stdc_count_zeros_ul.c
@@ -0,0 +1,25 @@
+/* Count zeros for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_count_zeros_ul) (unsigned long int x)
+{
+  return stdc_count_zeros_ul (x);
+}
diff --git a/stdlib/stdc_count_zeros_ull.c b/stdlib/stdc_count_zeros_ull.c
new file mode 100644
index 0000000000..d594d86141
--- /dev/null
+++ b/stdlib/stdc_count_zeros_ull.c
@@ -0,0 +1,25 @@
+/* Count zeros for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_count_zeros_ull) (unsigned long long int x)
+{
+  return stdc_count_zeros_ull (x);
+}
diff --git a/stdlib/stdc_count_zeros_us.c b/stdlib/stdc_count_zeros_us.c
new file mode 100644
index 0000000000..0492c39031
--- /dev/null
+++ b/stdlib/stdc_count_zeros_us.c
@@ -0,0 +1,25 @@
+/* Count zeros for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_count_zeros_us) (unsigned short x)
+{
+  return stdc_count_zeros_us (x);
+}
diff --git a/stdlib/stdc_first_leading_one_uc.c b/stdlib/stdc_first_leading_one_uc.c
new file mode 100644
index 0000000000..1f37a7afb8
--- /dev/null
+++ b/stdlib/stdc_first_leading_one_uc.c
@@ -0,0 +1,25 @@
+/* First leading one for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_leading_one_uc) (unsigned char x)
+{
+  return stdc_first_leading_one_uc (x);
+}
diff --git a/stdlib/stdc_first_leading_one_ui.c b/stdlib/stdc_first_leading_one_ui.c
new file mode 100644
index 0000000000..5a97315811
--- /dev/null
+++ b/stdlib/stdc_first_leading_one_ui.c
@@ -0,0 +1,25 @@
+/* First leading one for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_leading_one_ui) (unsigned int x)
+{
+  return stdc_first_leading_one_ui (x);
+}
diff --git a/stdlib/stdc_first_leading_one_ul.c b/stdlib/stdc_first_leading_one_ul.c
new file mode 100644
index 0000000000..bf5589afe7
--- /dev/null
+++ b/stdlib/stdc_first_leading_one_ul.c
@@ -0,0 +1,25 @@
+/* First leading one for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_leading_one_ul) (unsigned long int x)
+{
+  return stdc_first_leading_one_ul (x);
+}
diff --git a/stdlib/stdc_first_leading_one_ull.c b/stdlib/stdc_first_leading_one_ull.c
new file mode 100644
index 0000000000..a07e121cb0
--- /dev/null
+++ b/stdlib/stdc_first_leading_one_ull.c
@@ -0,0 +1,25 @@
+/* First leading one for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_leading_one_ull) (unsigned long long int x)
+{
+  return stdc_first_leading_one_ull (x);
+}
diff --git a/stdlib/stdc_first_leading_one_us.c b/stdlib/stdc_first_leading_one_us.c
new file mode 100644
index 0000000000..95a7427986
--- /dev/null
+++ b/stdlib/stdc_first_leading_one_us.c
@@ -0,0 +1,25 @@
+/* First leading one for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_leading_one_us) (unsigned short x)
+{
+  return stdc_first_leading_one_us (x);
+}
diff --git a/stdlib/stdc_first_leading_zero_uc.c b/stdlib/stdc_first_leading_zero_uc.c
new file mode 100644
index 0000000000..89830d125f
--- /dev/null
+++ b/stdlib/stdc_first_leading_zero_uc.c
@@ -0,0 +1,25 @@
+/* First leading zero for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_leading_zero_uc) (unsigned char x)
+{
+  return stdc_first_leading_zero_uc (x);
+}
diff --git a/stdlib/stdc_first_leading_zero_ui.c b/stdlib/stdc_first_leading_zero_ui.c
new file mode 100644
index 0000000000..9c14c3e5d0
--- /dev/null
+++ b/stdlib/stdc_first_leading_zero_ui.c
@@ -0,0 +1,25 @@
+/* First leading zero for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_leading_zero_ui) (unsigned int x)
+{
+  return stdc_first_leading_zero_ui (x);
+}
diff --git a/stdlib/stdc_first_leading_zero_ul.c b/stdlib/stdc_first_leading_zero_ul.c
new file mode 100644
index 0000000000..24439174d4
--- /dev/null
+++ b/stdlib/stdc_first_leading_zero_ul.c
@@ -0,0 +1,25 @@
+/* First leading zero for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_leading_zero_ul) (unsigned long int x)
+{
+  return stdc_first_leading_zero_ul (x);
+}
diff --git a/stdlib/stdc_first_leading_zero_ull.c b/stdlib/stdc_first_leading_zero_ull.c
new file mode 100644
index 0000000000..7cca7db3d1
--- /dev/null
+++ b/stdlib/stdc_first_leading_zero_ull.c
@@ -0,0 +1,25 @@
+/* First leading zero for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_leading_zero_ull) (unsigned long long int x)
+{
+  return stdc_first_leading_zero_ull (x);
+}
diff --git a/stdlib/stdc_first_leading_zero_us.c b/stdlib/stdc_first_leading_zero_us.c
new file mode 100644
index 0000000000..9cdf8712b3
--- /dev/null
+++ b/stdlib/stdc_first_leading_zero_us.c
@@ -0,0 +1,25 @@
+/* First leading zero for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_leading_zero_us) (unsigned short x)
+{
+  return stdc_first_leading_zero_us (x);
+}
diff --git a/stdlib/stdc_first_trailing_one_uc.c b/stdlib/stdc_first_trailing_one_uc.c
new file mode 100644
index 0000000000..8253cc8f8d
--- /dev/null
+++ b/stdlib/stdc_first_trailing_one_uc.c
@@ -0,0 +1,25 @@
+/* First trailing one for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_trailing_one_uc) (unsigned char x)
+{
+  return stdc_first_trailing_one_uc (x);
+}
diff --git a/stdlib/stdc_first_trailing_one_ui.c b/stdlib/stdc_first_trailing_one_ui.c
new file mode 100644
index 0000000000..84207af689
--- /dev/null
+++ b/stdlib/stdc_first_trailing_one_ui.c
@@ -0,0 +1,25 @@
+/* First trailing one for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_trailing_one_ui) (unsigned int x)
+{
+  return stdc_first_trailing_one_ui (x);
+}
diff --git a/stdlib/stdc_first_trailing_one_ul.c b/stdlib/stdc_first_trailing_one_ul.c
new file mode 100644
index 0000000000..4a9283ae41
--- /dev/null
+++ b/stdlib/stdc_first_trailing_one_ul.c
@@ -0,0 +1,25 @@
+/* First trailing one for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_trailing_one_ul) (unsigned long int x)
+{
+  return stdc_first_trailing_one_ul (x);
+}
diff --git a/stdlib/stdc_first_trailing_one_ull.c b/stdlib/stdc_first_trailing_one_ull.c
new file mode 100644
index 0000000000..a15637fa70
--- /dev/null
+++ b/stdlib/stdc_first_trailing_one_ull.c
@@ -0,0 +1,25 @@
+/* First trailing one for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_trailing_one_ull) (unsigned long long int x)
+{
+  return stdc_first_trailing_one_ull (x);
+}
diff --git a/stdlib/stdc_first_trailing_one_us.c b/stdlib/stdc_first_trailing_one_us.c
new file mode 100644
index 0000000000..a7803e8c6d
--- /dev/null
+++ b/stdlib/stdc_first_trailing_one_us.c
@@ -0,0 +1,25 @@
+/* First trailing one for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_trailing_one_us) (unsigned short x)
+{
+  return stdc_first_trailing_one_us (x);
+}
diff --git a/stdlib/stdc_first_trailing_zero_uc.c b/stdlib/stdc_first_trailing_zero_uc.c
new file mode 100644
index 0000000000..de5aa90dc0
--- /dev/null
+++ b/stdlib/stdc_first_trailing_zero_uc.c
@@ -0,0 +1,25 @@
+/* First trailing zero for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_trailing_zero_uc) (unsigned char x)
+{
+  return stdc_first_trailing_zero_uc (x);
+}
diff --git a/stdlib/stdc_first_trailing_zero_ui.c b/stdlib/stdc_first_trailing_zero_ui.c
new file mode 100644
index 0000000000..ec54242a1b
--- /dev/null
+++ b/stdlib/stdc_first_trailing_zero_ui.c
@@ -0,0 +1,25 @@
+/* First trailing zero for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_trailing_zero_ui) (unsigned int x)
+{
+  return stdc_first_trailing_zero_ui (x);
+}
diff --git a/stdlib/stdc_first_trailing_zero_ul.c b/stdlib/stdc_first_trailing_zero_ul.c
new file mode 100644
index 0000000000..1f63408827
--- /dev/null
+++ b/stdlib/stdc_first_trailing_zero_ul.c
@@ -0,0 +1,25 @@
+/* First trailing zero for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_trailing_zero_ul) (unsigned long int x)
+{
+  return stdc_first_trailing_zero_ul (x);
+}
diff --git a/stdlib/stdc_first_trailing_zero_ull.c b/stdlib/stdc_first_trailing_zero_ull.c
new file mode 100644
index 0000000000..89855e4378
--- /dev/null
+++ b/stdlib/stdc_first_trailing_zero_ull.c
@@ -0,0 +1,25 @@
+/* First trailing zero for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_trailing_zero_ull) (unsigned long long int x)
+{
+  return stdc_first_trailing_zero_ull (x);
+}
diff --git a/stdlib/stdc_first_trailing_zero_us.c b/stdlib/stdc_first_trailing_zero_us.c
new file mode 100644
index 0000000000..fa4d966412
--- /dev/null
+++ b/stdlib/stdc_first_trailing_zero_us.c
@@ -0,0 +1,25 @@
+/* First trailing zero for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_first_trailing_zero_us) (unsigned short x)
+{
+  return stdc_first_trailing_zero_us (x);
+}
diff --git a/stdlib/stdc_has_single_bit_uc.c b/stdlib/stdc_has_single_bit_uc.c
new file mode 100644
index 0000000000..16f917131b
--- /dev/null
+++ b/stdlib/stdc_has_single_bit_uc.c
@@ -0,0 +1,25 @@
+/* Single-bit check for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+_Bool
+(stdc_has_single_bit_uc) (unsigned char x)
+{
+  return stdc_has_single_bit_uc (x);
+}
diff --git a/stdlib/stdc_has_single_bit_ui.c b/stdlib/stdc_has_single_bit_ui.c
new file mode 100644
index 0000000000..0c8388ccf6
--- /dev/null
+++ b/stdlib/stdc_has_single_bit_ui.c
@@ -0,0 +1,25 @@
+/* Single-bit check for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+_Bool
+(stdc_has_single_bit_ui) (unsigned int x)
+{
+  return stdc_has_single_bit_ui (x);
+}
diff --git a/stdlib/stdc_has_single_bit_ul.c b/stdlib/stdc_has_single_bit_ul.c
new file mode 100644
index 0000000000..2e5839b08a
--- /dev/null
+++ b/stdlib/stdc_has_single_bit_ul.c
@@ -0,0 +1,25 @@
+/* Single-bit check for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+_Bool
+(stdc_has_single_bit_ul) (unsigned long int x)
+{
+  return stdc_has_single_bit_ul (x);
+}
diff --git a/stdlib/stdc_has_single_bit_ull.c b/stdlib/stdc_has_single_bit_ull.c
new file mode 100644
index 0000000000..e0358af719
--- /dev/null
+++ b/stdlib/stdc_has_single_bit_ull.c
@@ -0,0 +1,25 @@
+/* Single-bit check for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+_Bool
+(stdc_has_single_bit_ull) (unsigned long long int x)
+{
+  return stdc_has_single_bit_ull (x);
+}
diff --git a/stdlib/stdc_has_single_bit_us.c b/stdlib/stdc_has_single_bit_us.c
new file mode 100644
index 0000000000..9e86a52647
--- /dev/null
+++ b/stdlib/stdc_has_single_bit_us.c
@@ -0,0 +1,25 @@
+/* Single-bit check for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+_Bool
+(stdc_has_single_bit_us) (unsigned short x)
+{
+  return stdc_has_single_bit_us (x);
+}
diff --git a/stdlib/stdc_leading_ones_uc.c b/stdlib/stdc_leading_ones_uc.c
new file mode 100644
index 0000000000..f366e08c98
--- /dev/null
+++ b/stdlib/stdc_leading_ones_uc.c
@@ -0,0 +1,25 @@
+/* Count leading ones for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_leading_ones_uc) (unsigned char x)
+{
+  return stdc_leading_ones_uc (x);
+}
diff --git a/stdlib/stdc_leading_ones_ui.c b/stdlib/stdc_leading_ones_ui.c
new file mode 100644
index 0000000000..fae76eb0c1
--- /dev/null
+++ b/stdlib/stdc_leading_ones_ui.c
@@ -0,0 +1,25 @@
+/* Count leading ones for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_leading_ones_ui) (unsigned int x)
+{
+  return stdc_leading_ones_ui (x);
+}
diff --git a/stdlib/stdc_leading_ones_ul.c b/stdlib/stdc_leading_ones_ul.c
new file mode 100644
index 0000000000..cac5bff1d4
--- /dev/null
+++ b/stdlib/stdc_leading_ones_ul.c
@@ -0,0 +1,25 @@
+/* Count leading ones for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_leading_ones_ul) (unsigned long int x)
+{
+  return stdc_leading_ones_ul (x);
+}
diff --git a/stdlib/stdc_leading_ones_ull.c b/stdlib/stdc_leading_ones_ull.c
new file mode 100644
index 0000000000..3fd8767ebe
--- /dev/null
+++ b/stdlib/stdc_leading_ones_ull.c
@@ -0,0 +1,25 @@
+/* Count leading ones for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_leading_ones_ull) (unsigned long long int x)
+{
+  return stdc_leading_ones_ull (x);
+}
diff --git a/stdlib/stdc_leading_ones_us.c b/stdlib/stdc_leading_ones_us.c
new file mode 100644
index 0000000000..98b127d888
--- /dev/null
+++ b/stdlib/stdc_leading_ones_us.c
@@ -0,0 +1,25 @@
+/* Count leading ones for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_leading_ones_us) (unsigned short x)
+{
+  return stdc_leading_ones_us (x);
+}
diff --git a/stdlib/stdc_leading_zeros_uc.c b/stdlib/stdc_leading_zeros_uc.c
new file mode 100644
index 0000000000..f5a5641479
--- /dev/null
+++ b/stdlib/stdc_leading_zeros_uc.c
@@ -0,0 +1,25 @@
+/* Count leading zeros for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_leading_zeros_uc) (unsigned char x)
+{
+  return stdc_leading_zeros_uc (x);
+}
diff --git a/stdlib/stdc_leading_zeros_ui.c b/stdlib/stdc_leading_zeros_ui.c
new file mode 100644
index 0000000000..e307f4f6a8
--- /dev/null
+++ b/stdlib/stdc_leading_zeros_ui.c
@@ -0,0 +1,25 @@
+/* Count leading zeros for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_leading_zeros_ui) (unsigned int x)
+{
+  return stdc_leading_zeros_ui (x);
+}
diff --git a/stdlib/stdc_leading_zeros_ul.c b/stdlib/stdc_leading_zeros_ul.c
new file mode 100644
index 0000000000..ebca92a91c
--- /dev/null
+++ b/stdlib/stdc_leading_zeros_ul.c
@@ -0,0 +1,25 @@
+/* Count leading zeros for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_leading_zeros_ul) (unsigned long int x)
+{
+  return stdc_leading_zeros_ul (x);
+}
diff --git a/stdlib/stdc_leading_zeros_ull.c b/stdlib/stdc_leading_zeros_ull.c
new file mode 100644
index 0000000000..5f337e4c1e
--- /dev/null
+++ b/stdlib/stdc_leading_zeros_ull.c
@@ -0,0 +1,25 @@
+/* Count leading zeros for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_leading_zeros_ull) (unsigned long long int x)
+{
+  return stdc_leading_zeros_ull (x);
+}
diff --git a/stdlib/stdc_leading_zeros_us.c b/stdlib/stdc_leading_zeros_us.c
new file mode 100644
index 0000000000..27eb458050
--- /dev/null
+++ b/stdlib/stdc_leading_zeros_us.c
@@ -0,0 +1,25 @@
+/* Count leading zeros for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_leading_zeros_us) (unsigned short x)
+{
+  return stdc_leading_zeros_us (x);
+}
diff --git a/stdlib/stdc_trailing_ones_uc.c b/stdlib/stdc_trailing_ones_uc.c
new file mode 100644
index 0000000000..4a7e85a6be
--- /dev/null
+++ b/stdlib/stdc_trailing_ones_uc.c
@@ -0,0 +1,25 @@
+/* Count trailing ones for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_trailing_ones_uc) (unsigned char x)
+{
+  return stdc_trailing_ones_uc (x);
+}
diff --git a/stdlib/stdc_trailing_ones_ui.c b/stdlib/stdc_trailing_ones_ui.c
new file mode 100644
index 0000000000..30b5d6209f
--- /dev/null
+++ b/stdlib/stdc_trailing_ones_ui.c
@@ -0,0 +1,25 @@
+/* Count trailing ones for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_trailing_ones_ui) (unsigned int x)
+{
+  return stdc_trailing_ones_ui (x);
+}
diff --git a/stdlib/stdc_trailing_ones_ul.c b/stdlib/stdc_trailing_ones_ul.c
new file mode 100644
index 0000000000..33a46eff62
--- /dev/null
+++ b/stdlib/stdc_trailing_ones_ul.c
@@ -0,0 +1,25 @@
+/* Count trailing ones for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_trailing_ones_ul) (unsigned long int x)
+{
+  return stdc_trailing_ones_ul (x);
+}
diff --git a/stdlib/stdc_trailing_ones_ull.c b/stdlib/stdc_trailing_ones_ull.c
new file mode 100644
index 0000000000..678f27868c
--- /dev/null
+++ b/stdlib/stdc_trailing_ones_ull.c
@@ -0,0 +1,25 @@
+/* Count trailing ones for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_trailing_ones_ull) (unsigned long long int x)
+{
+  return stdc_trailing_ones_ull (x);
+}
diff --git a/stdlib/stdc_trailing_ones_us.c b/stdlib/stdc_trailing_ones_us.c
new file mode 100644
index 0000000000..e91038460e
--- /dev/null
+++ b/stdlib/stdc_trailing_ones_us.c
@@ -0,0 +1,25 @@
+/* Count trailing ones for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_trailing_ones_us) (unsigned short x)
+{
+  return stdc_trailing_ones_us (x);
+}
diff --git a/stdlib/stdc_trailing_zeros_uc.c b/stdlib/stdc_trailing_zeros_uc.c
new file mode 100644
index 0000000000..45e1b2ef9f
--- /dev/null
+++ b/stdlib/stdc_trailing_zeros_uc.c
@@ -0,0 +1,25 @@
+/* Count trailing zeros for unsigned char.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_trailing_zeros_uc) (unsigned char x)
+{
+  return stdc_trailing_zeros_uc (x);
+}
diff --git a/stdlib/stdc_trailing_zeros_ui.c b/stdlib/stdc_trailing_zeros_ui.c
new file mode 100644
index 0000000000..a4cf3047aa
--- /dev/null
+++ b/stdlib/stdc_trailing_zeros_ui.c
@@ -0,0 +1,25 @@
+/* Count trailing zeros for unsigned int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_trailing_zeros_ui) (unsigned int x)
+{
+  return stdc_trailing_zeros_ui (x);
+}
diff --git a/stdlib/stdc_trailing_zeros_ul.c b/stdlib/stdc_trailing_zeros_ul.c
new file mode 100644
index 0000000000..1a9a34776b
--- /dev/null
+++ b/stdlib/stdc_trailing_zeros_ul.c
@@ -0,0 +1,25 @@
+/* Count trailing zeros for unsigned long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_trailing_zeros_ul) (unsigned long int x)
+{
+  return stdc_trailing_zeros_ul (x);
+}
diff --git a/stdlib/stdc_trailing_zeros_ull.c b/stdlib/stdc_trailing_zeros_ull.c
new file mode 100644
index 0000000000..4d67050119
--- /dev/null
+++ b/stdlib/stdc_trailing_zeros_ull.c
@@ -0,0 +1,25 @@
+/* Count trailing zeros for unsigned long long int.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_trailing_zeros_ull) (unsigned long long int x)
+{
+  return stdc_trailing_zeros_ull (x);
+}
diff --git a/stdlib/stdc_trailing_zeros_us.c b/stdlib/stdc_trailing_zeros_us.c
new file mode 100644
index 0000000000..a2c515253a
--- /dev/null
+++ b/stdlib/stdc_trailing_zeros_us.c
@@ -0,0 +1,25 @@
+/* Count trailing zeros for unsigned short.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+
+unsigned int
+(stdc_trailing_zeros_us) (unsigned short x)
+{
+  return stdc_trailing_zeros_us (x);
+}
diff --git a/stdlib/stdint.h b/stdlib/stdint.h
index 165a201ada..c5e586e62b 100644
--- a/stdlib/stdint.h
+++ b/stdlib/stdint.h
@@ -38,18 +38,7 @@
 
 
 /* Small types.  */
-
-/* Signed.  */
-typedef __int_least8_t int_least8_t;
-typedef __int_least16_t int_least16_t;
-typedef __int_least32_t int_least32_t;
-typedef __int_least64_t int_least64_t;
-
-/* Unsigned.  */
-typedef __uint_least8_t uint_least8_t;
-typedef __uint_least16_t uint_least16_t;
-typedef __uint_least32_t uint_least32_t;
-typedef __uint_least64_t uint_least64_t;
+#include <bits/stdint-least.h>
 
 
 /* Fast types.  */
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 74a9f427b2..2adf98e71d 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -2334,6 +2334,76 @@ GLIBC_2.38 strlcat F
 GLIBC_2.38 strlcpy F
 GLIBC_2.38 wcslcat F
 GLIBC_2.38 wcslcpy F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index 24db98d765..7c685645bb 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -2114,6 +2114,76 @@ GLIBC_2.38 wprintf F
 GLIBC_2.38 write F
 GLIBC_2.38 writev F
 GLIBC_2.38 wscanf F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 HURD_CTHREADS_0.3 __cthread_getspecific F
 HURD_CTHREADS_0.3 __cthread_keycreate F
 HURD_CTHREADS_0.3 __cthread_setspecific F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index b3484be555..68eeca1c08 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2678,3 +2678,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 09c03b0e3f..34c187b721 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2787,6 +2787,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
index 63761315d0..916c18ea94 100644
--- a/sysdeps/unix/sysv/linux/arc/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
@@ -2439,3 +2439,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index d0860b25e0..ea95de282a 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -559,6 +559,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index b93819cab4..1cdbc983e1 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -556,6 +556,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index ca5db5cde5..96d45961e2 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2715,3 +2715,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index e736477ce6..fbcd60c2b3 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2664,6 +2664,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 56263a5111..c989b433c0 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2848,6 +2848,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index 504b6a7fa7..52ae704171 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -2613,6 +2613,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
index 3cdc2b9d85..0023ec1fa1 100644
--- a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
@@ -2199,3 +2199,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index 1cbebfb162..d9bd6a9b56 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -560,6 +560,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0x98
 GLIBC_2.4 _IO_2_1_stdin_ D 0x98
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 8dd696a24e..439796d693 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2791,6 +2791,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index ddfab38be7..1069d3252c 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2764,3 +2764,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index 88fd2a735f..17abe08c8b 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2761,3 +2761,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 880e4f8bfd..799e508950 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2756,6 +2756,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 016f8fba79..1c10996cbc 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2754,6 +2754,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 0688873db5..03d9655f26 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2762,6 +2762,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index 0f0b10ccb1..05e402ed30 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -2664,6 +2664,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index c39db78ea8..3aa81766aa 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2803,3 +2803,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/or1k/libc.abilist b/sysdeps/unix/sysv/linux/or1k/libc.abilist
index 31b02d2a1e..c40c843aaf 100644
--- a/sysdeps/unix/sysv/linux/or1k/libc.abilist
+++ b/sysdeps/unix/sysv/linux/or1k/libc.abilist
@@ -2185,3 +2185,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index d23c6a0447..9714305608 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2830,6 +2830,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index 6667852f18..0beb52c542 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2863,6 +2863,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 3fb527362e..cfc2ebd3ec 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -2584,6 +2584,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index 2c975dcad6..8c9efc5a16 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -2898,3 +2898,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
index a13c484582..f90c94bc35 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
@@ -2441,3 +2441,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index cf65d8d6d4..e04ff93bd2 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -2641,3 +2641,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 3d78db8445..a7467e2850 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2828,6 +2828,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index 030b26c376..fd1cb2972d 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -2621,6 +2621,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 155b2c03ff..ff6e6b1a13 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2671,6 +2671,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 1042622943..449d92bbc5 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2668,6 +2668,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index afa62cdbe6..e615be759a 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2823,6 +2823,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 9e9df3876b..bd36431dd7 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -2636,6 +2636,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 893f0886dd..aea7848ed6 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -2587,6 +2587,76 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index 9bcc1986a1..4ab3681914 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2693,3 +2693,73 @@ GLIBC_2.39 pidfd_spawn F
 GLIBC_2.39 pidfd_spawnp F
 GLIBC_2.39 posix_spawnattr_getcgroup_np F
 GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
Jakub Jelinek Nov. 14, 2023, 7:14 p.m. UTC | #2
On Tue, Nov 14, 2023 at 06:02:12PM +0000, Joseph Myers wrote:
> On Tue, 14 Nov 2023, Jakub Jelinek wrote:
> 
> > In order to double-check the __builtin_{clz,ctz,popcount}g builtins
> > I've added today to GCC, I've tried to implement the C23 stdbit.h
> > header (but just the header, not anything further) plus a test (though,
> > in GCC style where it aborts on error and returns 0 otherwise) for it.
> 
> The following is my current in-progress patch (which needs tests and 
> documentation, so it's quite possible some implementations are currently 
> incorrect) - including all the out-of-line implementations (defined so 
> that the out-of-line function implementations use the inline macro 
> implementations from the header).  It doesn't attempt to use the new 
> built-in functions (or, thus, to support _BitInt).  Among my notes for 
> things to cover in tests include that all macros are usable inside sizeof 
> etc. outside of a function (thus, do not use ({ })) - also that 
> type-specific calls have the correct implicit argument conversions, also 
> that both type-specific and type-generic calls evaluate arguments exactly 
> once.  I haven't tested how well-optimized code is for any of these 
> implementations (type-specific or type-generic) - but if it isn't, it 
> probably should be, since I think all of these are among reasonable 
> options for how to express the operations in terms of the underlying 
> built-in functions.

I think the fallback _Generic versions satisfy that, but the
__builtin_{clz,ctz,popcount}g unfortunately do use ({ }) in 3 of them.
In one case it is just an optimization attempt and it isn't strictly
necessary, stdc_bit_width can be implemented as popcount (value) == 1
or as value && (value & (value - 1)) == 0 or as
value && (value & -value) == value, and perhaps we could just optimize
popcount (value) == 1 into the second test in GCC in match.pd.
But, I'm really out of ideas what to do about stdc_bit_floor and
stdc_bit_ceil to
1) evaluate argument just once
2) handle all _BitInts
3) avoid ({ })
One can't use an inline function because of 2), unless 65535+
functions are added, 3) was a way to handle 1).

Actually, maybe
#define stdc_bit_ceil(value) \
  (((__typeof (value)) 1) << ((__builtin_popcountg ((__typeof (value)) ~(__typeof (value)) 0) - __builtin_clzg ((__typeof (value)) (value - 1), 0)) % __builtin_popcountg ((__typeof (value)) ~(__typeof (value)) 0)))
where say on unsigned _BitInt(275)
the above will be
  (((unsigned _BitInt(275)) 1) << ((275 - __builtin_clzg ((__typeof (value)) (value - 1), 0)) % 275))
and so for 0
  (((unsigned _BitInt(275)) 1) << (0 % 275))
and for 1
  (((unsigned _BitInt(275)) 1) << (275 % 275))
Maybe add some unsigned int cast in there to avoid the modulo being
signed and allow e.g. ffor powers of two width to be handled more
efficiently.

But the stdc_bit_floor needs 0 return value for input value of 0
and otherwise 1 << something, so
  ((value) == 0 ? (__typeof (value)) 0 : ((__typeof (value)) 1) << (__builtin_popcountg ((__typeof (value)) ~(__typeof (value)) 0) - 1 - __builtin_clzg (value)))
is inappropriate because if evaluates value twice; and while I can make
the shift count into whatever int value we want for value == 0 when
evaluating it just once, it won't turn the result into 0 unless << -1
would be allowed and result into >> 1.
?: with left out middle operand is yet another way how to avoid evaluating
something twice, but no idea how to use it here.
Maybe one ugly way for unsigned _BitInt with the exception of
unsigned _BitInt(__BITINT_MAXWIDTH__) would be (after
__builtin_classify_type (value) == 18 check) to use
 ((__typeof (value)) (((unsigned _BitInt(__builtin_popcountg ((__typeof (value)) ~(__typeof (value)) 0) + 1) 1) << (__builtin_popcountg ((__typeof (value)) ~(__typeof (value)) 0) - __builtin_clzg (value, __builtin_popcountg ((__typeof (value)) ~(__typeof (value)) 0)))) >> 1))
i.e. perform the left shift in one bit wider _BitInt type than value, say
again for unsigned _BitInt(275) value shift ((unsigned _BitInt(276)) 1) left
by 0 for the value == 0 case and by 1..275 for the other cases, then shift
right by 1 bit and cast.
And perhaps the unsigned _BitInt(__BITINT_MAXWIDTH__) case could be handled
in an static inline function (like the non-_BitInt cases).

BTW, in my stdbit.h version, I've added explicit casts in all the
sizeof/_Generic using type-generic macros, because otherwise GCC
-Wconversion was quite noisy on lots of uses in the testcase.

Anyway, feel free to cherry-pick anything useful from the posted patch.

	Jakub
Jakub Jelinek Nov. 14, 2023, 7:58 p.m. UTC | #3
On Tue, Nov 14, 2023 at 06:02:12PM +0000, Joseph Myers wrote:
> The following is my current in-progress patch (which needs tests and 
> documentation, so it's quite possible some implementations are currently 
> incorrect) - including all the out-of-line implementations (defined so 
> that the out-of-line function implementations use the inline macro 
> implementations from the header).  It doesn't attempt to use the new 
> built-in functions (or, thus, to support _BitInt).  Among my notes for 
> things to cover in tests include that all macros are usable inside sizeof 
> etc. outside of a function (thus, do not use ({ })) - also that 
> type-specific calls have the correct implicit argument conversions, also 
> that both type-specific and type-generic calls evaluate arguments exactly 
> once.  I haven't tested how well-optimized code is for any of these 
> implementations (type-specific or type-generic) - but if it isn't, it 
> probably should be, since I think all of these are among reasonable 
> options for how to express the operations in terms of the underlying 
> built-in functions.

BTW, my testcase revealed some issues in your patch, here is an incremental
diff to fix that.  For ctz8/16 nothing should be subtracted, the value
is the same except for the x == 0 case which obviously has different value.

--- stdlib/stdbit.h.jj	2023-11-14 20:37:28.395475727 +0100
+++ stdlib/stdbit.h	2023-11-14 20:54:58.788102241 +0100
@@ -172,13 +172,13 @@ __ctz32_inline (uint32_t __x)
 static __always_inline unsigned int
 __ctz16_inline (uint16_t __x)
 {
-  return __ctz32_inline (__x) - 16;
+  return __x == 0 ? 16 : __builtin_ctz (__x);
 }
 
 static __always_inline unsigned int
 __ctz8_inline (uint8_t __x)
 {
-  return __ctz32_inline (__x) - 24;
+  return __x == 0 ? 8 : __builtin_ctz (__x);
 }
 
 # define stdc_trailing_zeros_uc(x) (__ctz8_inline (x))
@@ -760,4 +760,4 @@ __bc8_inline (uint8_t __x)
 
 __END_DECLS
 
-#endif /* _THREADS_H */
+#endif /* _STDBIT_H */


	Jakub
Joseph Myers Nov. 14, 2023, 9:52 p.m. UTC | #4
On Tue, 14 Nov 2023, Jakub Jelinek wrote:

> In one case it is just an optimization attempt and it isn't strictly
> necessary, stdc_bit_width can be implemented as popcount (value) == 1
> or as value && (value & (value - 1)) == 0 or as
> value && (value & -value) == value, and perhaps we could just optimize
> popcount (value) == 1 into the second test in GCC in match.pd.

Optimizing popcount (value) == 1 seems like a good idea in general - just 
as, if there are cases where our different implementations (type-specific 
or type-generic) generate different code and the code for one 
implementation is clearly better than that for another, optimizing it 
would be a good idea, so that any reasonable combination of built-in 
functions for implementing these operations generates good code.  (For 
each operation, we effectively have at least four versions that could be 
compared for each width - the type-generic and type-specific versions in 
each of the two patches.)

> But, I'm really out of ideas what to do about stdc_bit_floor and
> stdc_bit_ceil to

New type-generic built-in functions for them?  Additional built-in 
functions for operations that are more complicated to implement in terms 
of the existing functions seem perfectly reasonable, even if not strictly 
required.
tavianator@tavianator.com Nov. 15, 2023, 7:11 p.m. UTC | #5
On Tue, 14 Nov 2023, Jakub Jelinek wrote:

> I think the fallback _Generic versions satisfy that, but the
> __builtin_{clz,ctz,popcount}g unfortunately do use ({ }) in 3 of them.
> In one case it is just an optimization attempt and it isn't strictly
> necessary, stdc_bit_width can be implemented as popcount (value) == 1

You mean stdc_has_single_bit()?

> or as value && (value & (value - 1)) == 0 or as
> value && (value & -value) == value

You might also consider

(value ^ (value - 1)) > value - 1

or

(value ^ -value) < -value

which avoid the && and so optimize a bit better.

> and perhaps we could just optimize
> popcount (value) == 1 into the second test in GCC in match.pd.

Also a good idea.  LLVM does this, and I just landed a patch to change
from the && variant to the ^ variant:
https://github.com/llvm/llvm-project/pull/72275
Andrew Pinski Nov. 15, 2023, 7:18 p.m. UTC | #6
On Tue, Nov 14, 2023 at 1:52 PM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Tue, 14 Nov 2023, Jakub Jelinek wrote:
>
> > In one case it is just an optimization attempt and it isn't strictly
> > necessary, stdc_bit_width can be implemented as popcount (value) == 1
> > or as value && (value & (value - 1)) == 0 or as
> > value && (value & -value) == value, and perhaps we could just optimize
> > popcount (value) == 1 into the second test in GCC in match.pd.
>
> Optimizing popcount (value) == 1 seems like a good idea in general - just
> as, if there are cases where our different implementations (type-specific
> or type-generic) generate different code and the code for one
> implementation is clearly better than that for another, optimizing it
> would be a good idea, so that any reasonable combination of built-in
> functions for implementing these operations generates good code.  (For
> each operation, we effectively have at least four versions that could be
> compared for each width - the type-generic and type-specific versions in
> each of the two patches.)

As popcount(n) == 1 goes the following bug reports are about that
specific thing:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94787
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90693

for gimple we should produce `popcount(n) == 1` since that since
simpler, and expand it (or in isel) change it to be optimized to
specific ways.

Thanks,
Andrew

>
> > But, I'm really out of ideas what to do about stdc_bit_floor and
> > stdc_bit_ceil to
>
> New type-generic built-in functions for them?  Additional built-in
> functions for operations that are more complicated to implement in terms
> of the existing functions seem perfectly reasonable, even if not strictly
> required.
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
Jakub Jelinek Nov. 16, 2023, 1:18 p.m. UTC | #7
On Wed, Nov 15, 2023 at 02:11:11PM -0500, tavianator@tavianator.com wrote:
> On Tue, 14 Nov 2023, Jakub Jelinek wrote:
> 
> > I think the fallback _Generic versions satisfy that, but the
> > __builtin_{clz,ctz,popcount}g unfortunately do use ({ }) in 3 of them.
> > In one case it is just an optimization attempt and it isn't strictly
> > necessary, stdc_bit_width can be implemented as popcount (value) == 1
> 
> You mean stdc_has_single_bit()?

Sure.

> > or as value && (value & (value - 1)) == 0 or as
> > value && (value & -value) == value
> 
> You might also consider
> 
> (value ^ (value - 1)) > value - 1
> 
> or
> 
> (value ^ -value) < -value
> 
> which avoid the && and so optimize a bit better.

Indeed.  I'll see what I can do on the GCC side.

For _BitInt larger than unsigned long long, I'd say the best is to use
__builtin_popcountg (value) == 1 and if needed optimize that during the
popcount _BitInt lowering (differentiate 3 cases, 0 bits set, 1 bit set,
more than one bit set), for the last case early out (the whole value
isn't single bit), the the former two add 0/1 to sum and again early exit
if it is 2 or more, because even ignoring the multiple evaluation stuff,
(value & (value - 1)) > value - 1
needs 2 loops, subtraction needs to operate from least significant limb
to most, & doesn't care and > needs to iterate from most significant limb
to least.  For that case
value != 0 && (value & (value - 1)) == 0
would be actually better as that can be done in one loop.

Anyway, I think it is a good idea to use (value ^ (value - 1)) > value - 1
in the __hsb*_inline functions, that is just 3 cheap operations rather than
5 and && isn't that cheap on various arches.

--- stdlib/stdbit.h.jj	2023-11-14 20:54:58.788102241 +0100
+++ stdlib/stdbit.h	2023-11-16 14:02:54.533538355 +0100
@@ -572,30 +572,33 @@ extern _Bool stdc_has_single_bit_ul (uns
 __extension__
 extern _Bool stdc_has_single_bit_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_has_single_bit(x) (stdc_has_single_bit_ull (x))
+#define stdc_has_single_bit(x)				\
+  (sizeof (x) <= sizeof (unsigned int)			\
+   ? stdc_has_single_bit_ui (x)				\
+   : stdc_has_single_bit_ull (x))
 
 static __always_inline _Bool
 __hsb64_inline (uint64_t __x)
 {
-  return __x == (__x & -__x) && __x != 0;
+  return (__x ^ (__x - 1)) > __x - 1;
 }
 
 static __always_inline _Bool
 __hsb32_inline (uint32_t __x)
 {
-  return __x == (__x & -__x) && __x != 0;
+  return (__x ^ (__x - 1)) > __x - 1;
 }
 
 static __always_inline _Bool
 __hsb16_inline (uint16_t __x)
 {
-  return __x == (__x & -__x) && __x != 0;
+  return (__x ^ (__x - 1)) > __x - 1;
 }
 
 static __always_inline _Bool
 __hsb8_inline (uint8_t __x)
 {
-  return __x == (__x & -__x) && __x != 0;
+  return (__x ^ (__x - 1)) > __x - 1;
 }
 
 #define stdc_has_single_bit_uc(x) (__hsb8_inline (x))


	Jakub
Jakub Jelinek Nov. 16, 2023, 3:59 p.m. UTC | #8
On Tue, Nov 14, 2023 at 09:52:03PM +0000, Joseph Myers wrote:
> > But, I'm really out of ideas what to do about stdc_bit_floor and
> > stdc_bit_ceil to
> 
> New type-generic built-in functions for them?  Additional built-in 
> functions for operations that are more complicated to implement in terms 
> of the existing functions seem perfectly reasonable, even if not strictly 
> required.

Actually, I managed to implement it, here it is (again, incremental patch
against your patch + the 2 other incremental patches I've already posted
against it).
({ ... }) isn't used and I believe the argument is always evaluated exactly
ones.  Passes the tst-stdbit.c I've already posted, but also this new
test which tests unsigned _BitInt.
Also tested with gcc 12 and tst-stdbit.c (i.e. the old type-generic macros).

For stdc_bit_ceil I've used ?: extension with omitted middle argument after
__extension__ because the idea with % didn't work out.
And stdc_bit_floor is the only large macro, which uses stdc_bit_floor_ull
for stuff that fits into 64 bits, optionally __bf128_inline for up to 128
bits (but doesn't use that on 32-bit platforms) and for unsigned _BitInt
uses the 1 bit larger unsigned _BitInt trick except for BITINT_MAXWIDTH,
in which case it uses yet another inline function.

--- stdlib/stdbit.h.jj	2023-11-16 14:02:54.533538355 +0100
+++ stdlib/stdbit.h	2023-11-16 16:13:54.985290612 +0100
@@ -32,6 +32,11 @@
 #define __STDC_ENDIAN_BIG__		__BIG_ENDIAN
 #define __STDC_ENDIAN_NATIVE__		__BYTE_ORDER
 
+#if __glibc_has_builtin (__builtin_popcountg)
+# define __stdc_type_width(x)				\
+  __builtin_popcountg ((__typeof (x)) ~(__typeof (x)) 0)
+#endif
+
 __BEGIN_DECLS
 
 /* Count leading zeros.  */
@@ -46,9 +51,15 @@ extern unsigned int stdc_leading_zeros_u
 __extension__
 extern unsigned int stdc_leading_zeros_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_leading_zeros(x)				\
+#if defined (__stdc_type_width) && __glibc_has_builtin (__builtin_clzg)
+# define stdc_leading_zeros(x)				\
+  ((unsigned int)					\
+   __builtin_clzg (x, __stdc_type_width (x)))
+#else
+# define stdc_leading_zeros(x)				\
   (stdc_leading_zeros_ull (x)				\
    - (unsigned int) (8 * (sizeof (0ULL) - sizeof (x))))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
 static __always_inline unsigned int
@@ -98,9 +109,16 @@ extern unsigned int stdc_leading_ones_ul
 __extension__
 extern unsigned int stdc_leading_ones_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_leading_ones(x)					\
+#if defined (__stdc_type_width) && __glibc_has_builtin (__builtin_clzg)
+# define stdc_leading_ones(x)					\
+  ((unsigned int)						\
+   __builtin_clzg ((__typeof (x)) ~(x),				\
+		   __stdc_type_width (x)))
+#else
+# define stdc_leading_ones(x)					\
   (stdc_leading_ones_ull ((unsigned long long int) (x)		\
 			  << 8 * (sizeof (0ULL) - sizeof (x))))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
 static __always_inline unsigned int
@@ -150,11 +168,16 @@ extern unsigned int stdc_trailing_zeros_
 __extension__
 extern unsigned int stdc_trailing_zeros_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_trailing_zeros(x)				\
+#if defined (__stdc_type_width) && __glibc_has_builtin (__builtin_ctzg)
+# define stdc_trailing_zeros(x)				\
+  ((unsigned int) __builtin_ctzg (x, __stdc_type_width (x)))
+#else
+# define stdc_trailing_zeros(x)				\
   (sizeof (x) == 8 ? stdc_trailing_zeros_ull (x)	\
    : sizeof (x) == 4 ? stdc_trailing_zeros_ui (x)	\
    : sizeof (x) == 2 ? stdc_trailing_zeros_us (x)	\
    : stdc_trailing_zeros_uc (x))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
 static __always_inline unsigned int
@@ -204,7 +227,14 @@ extern unsigned int stdc_trailing_ones_u
 __extension__
 extern unsigned int stdc_trailing_ones_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_trailing_ones(x) (stdc_trailing_ones_ull (x))
+#if defined (__stdc_type_width) && __glibc_has_builtin (__builtin_ctzg)
+# define stdc_trailing_ones(x)				\
+  ((unsigned int)					\
+   __builtin_ctzg ((__typeof (x)) ~(x),			\
+		   __stdc_type_width (x)))
+#else
+# define stdc_trailing_ones(x) (stdc_trailing_ones_ull (x))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
 static __always_inline unsigned int
@@ -254,11 +284,16 @@ extern unsigned int stdc_first_leading_z
 __extension__
 extern unsigned int stdc_first_leading_zero_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_first_leading_zero(x)			\
+#if __glibc_has_builtin (__builtin_clzg)
+# define stdc_first_leading_zero(x)			\
+  (__builtin_clzg ((__typeof (x)) ~(x), -1) + 1U)
+#else
+# define stdc_first_leading_zero(x)			\
   (sizeof (x) == 8 ? stdc_first_leading_zero_ull (x)	\
    : sizeof (x) == 4 ? stdc_first_leading_zero_ui (x)	\
    : sizeof (x) == 2 ? stdc_first_leading_zero_us (x)	\
    : stdc_first_leading_zero_uc (x))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
 static __always_inline unsigned int
@@ -308,11 +343,16 @@ extern unsigned int stdc_first_leading_o
 __extension__
 extern unsigned int stdc_first_leading_one_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_first_leading_one(x)			\
+#if __glibc_has_builtin (__builtin_clzg)
+# define stdc_first_leading_one(x)			\
+  (__builtin_clzg (x, -1) + 1U)
+#else
+# define stdc_first_leading_one(x)			\
   (sizeof (x) == 8 ? stdc_first_leading_one_ull (x)	\
    : sizeof (x) == 4 ? stdc_first_leading_one_ui (x)	\
    : sizeof (x) == 2 ? stdc_first_leading_one_us (x)	\
    : stdc_first_leading_one_uc (x))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
 static __always_inline unsigned int
@@ -362,11 +402,16 @@ extern unsigned int stdc_first_trailing_
 __extension__
 extern unsigned int stdc_first_trailing_zero_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_first_trailing_zero(x)			\
+#if __glibc_has_builtin (__builtin_ctzg)
+# define stdc_first_trailing_zero(x)			\
+  (__builtin_ctzg ((__typeof (x)) ~(x), -1) + 1U)
+#else
+# define stdc_first_trailing_zero(x)			\
   (sizeof (x) == 8 ? stdc_first_trailing_zero_ull (x)	\
    : sizeof (x) == 4 ? stdc_first_trailing_zero_ui (x)	\
    : sizeof (x) == 2 ? stdc_first_trailing_zero_us (x)	\
    : stdc_first_trailing_zero_uc (x))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
 static __always_inline unsigned int
@@ -416,11 +461,16 @@ extern unsigned int stdc_first_trailing_
 __extension__
 extern unsigned int stdc_first_trailing_one_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_first_trailing_one(x)			\
+#if __glibc_has_builtin (__builtin_ctzg)
+# define stdc_first_trailing_one(x)			\
+  ((unsigned int) __builtin_ctzg (x, -1) + 1U)
+#else
+# define stdc_first_trailing_one(x)			\
   (sizeof (x) == 8 ? stdc_first_trailing_one_ull (x)	\
    : sizeof (x) == 4 ? stdc_first_trailing_one_ui (x)	\
    : sizeof (x) == 2 ? stdc_first_trailing_one_us (x)	\
    : stdc_first_trailing_one_uc (x))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
 static __always_inline unsigned int
@@ -470,9 +520,15 @@ extern unsigned int stdc_count_zeros_ul
 __extension__
 extern unsigned int stdc_count_zeros_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_count_zeros(x)				\
+#if __glibc_has_builtin (__builtin_popcountg)
+# define stdc_count_zeros(x)				\
+  ((unsigned int)					\
+   __builtin_popcountg ((__typeof (x)) ~(x)))
+#else
+# define stdc_count_zeros(x)				\
   (stdc_count_zeros_ull (x)				\
    - (unsigned int) (8 * (sizeof (0ULL) - sizeof (x))))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_popcountll)
 static __always_inline unsigned int
@@ -522,7 +578,12 @@ extern unsigned int stdc_count_ones_ul (
 __extension__
 extern unsigned int stdc_count_ones_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_count_ones(x) (stdc_count_ones_ull (x))
+#if __glibc_has_builtin (__builtin_popcountg)
+# define stdc_count_ones(x)				\
+  ((unsigned int) __builtin_popcountg (x))
+#else
+# define stdc_count_ones(x) (stdc_count_ones_ull (x))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_popcountll)
 static __always_inline unsigned int
@@ -572,10 +633,19 @@ extern _Bool stdc_has_single_bit_ul (uns
 __extension__
 extern _Bool stdc_has_single_bit_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_has_single_bit(x)				\
+#if __glibc_has_builtin (__builtin_popcountg)
+# define stdc_has_single_bit(x)				\
+  (sizeof (x) <= sizeof (unsigned int)			\
+   ? stdc_has_single_bit_ui (x)				\
+   : sizeof (x) <= sizeof (unsigned long long)		\
+   ? stdc_has_single_bit_ull (x)			\
+   : (_Bool) (__builtin_popcountg (x) == 1))
+#else
+# define stdc_has_single_bit(x)				\
   (sizeof (x) <= sizeof (unsigned int)			\
    ? stdc_has_single_bit_ui (x)				\
    : stdc_has_single_bit_ull (x))
+#endif
 
 static __always_inline _Bool
 __hsb64_inline (uint64_t __x)
@@ -623,7 +693,14 @@ extern unsigned int stdc_bit_width_ul (u
 __extension__
 extern unsigned int stdc_bit_width_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_bit_width(x) (stdc_bit_width_ull (x))
+#if defined (__stdc_type_width) && __glibc_has_builtin (__builtin_clzg)
+# define stdc_bit_width(x)				\
+  ((unsigned int)					\
+   (__stdc_type_width (x)				\
+    - __builtin_clzg (x, __stdc_type_width (x))))
+#else
+# define stdc_bit_width(x) (stdc_bit_width_ull (x))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
 static __always_inline unsigned int
@@ -673,7 +750,47 @@ extern unsigned long int stdc_bit_floor_
 __extension__
 extern unsigned long long int stdc_bit_floor_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_bit_floor(x) ((__typeof (x)) stdc_bit_floor_ull (x))
+#if defined (__stdc_type_width) && __glibc_has_builtin (__builtin_clzg)
+# ifdef __SIZEOF_INT128__
+static __always_inline unsigned __int128
+__bf128_inline (unsigned __int128 __x)
+{
+  return __x == 0 ? 0 : ((unsigned __int128) 1) << (stdc_bit_width (__x) - 1);
+}
+# else
+#  define __bf128_inline stdc_bit_floor_ull
+# endif
+# ifdef __BITINT_MAXWIDTH__
+static __always_inline unsigned _BitInt(__BITINT_MAXWIDTH__)
+__bfbitintmax_inline (unsigned _BitInt(__BITINT_MAXWIDTH__) __x)
+{
+  return __x == 0 ? 0 : (((unsigned _BitInt(__BITINT_MAXWIDTH__)) 1)
+			 << (stdc_bit_width (__x) - 1));
+}
+#  define stdc_bit_floor(x)					\
+  (sizeof (x) <= sizeof (unsigned long long)			\
+   ? (__typeof (x)) stdc_bit_floor_ull (x)			\
+   : sizeof (x) <= sizeof (__typeof (__bf128_inline (0)))	\
+   ? (__typeof (x)) __bf128_inline (x)				\
+   : __stdc_type_width (x) == __BITINT_MAXWIDTH__		\
+   ? (__typeof (x)) __bfbitintmax_inline (x)			\
+   : (__typeof (x))						\
+     ((((unsigned _BitInt(__stdc_type_width (x)			\
+			  == __BITINT_MAXWIDTH__		\
+			  ? 1 : __stdc_type_width (x) + 1)) 1)	\
+       << (__stdc_type_width (x) == __BITINT_MAXWIDTH__ ? 0	\
+	   : (__stdc_type_width (x)				\
+	      - __builtin_clzg (x, __stdc_type_width (x)))))	\
+      >> 1))
+# else
+#  define stdc_bit_floor(x)					\
+  (sizeof (x) <= sizeof (unsigned long long)			\
+   ? (__typeof (x)) stdc_bit_floor_ull (x)			\
+   : (__typeof (x)) __bf128_inline (x))
+# endif
+#else
+# define stdc_bit_floor(x) ((__typeof (x)) stdc_bit_floor_ull (x))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
 static __always_inline uint64_t
@@ -723,7 +840,16 @@ extern unsigned long int stdc_bit_ceil_u
 __extension__
 extern unsigned long long int stdc_bit_ceil_ull (unsigned long long int __x)
      __THROW __attribute_const__;
-#define stdc_bit_ceil(x) ((__typeof (x)) stdc_bit_ceil_ull (x))
+#if defined (__stdc_type_width) && __glibc_has_builtin (__builtin_clzg)
+# define stdc_bit_ceil(x)					\
+  (((__typeof (x)) 1)				 		\
+   << (__stdc_type_width (x)					\
+       - __builtin_clzg ((__typeof (x))				\
+			 ((__extension__ ((x) ? : 1)) - 1),	\
+			 __stdc_type_width (x))))
+#else
+# define stdc_bit_ceil(x) ((__typeof (x)) stdc_bit_ceil_ull (x))
+#endif
 
 #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
 static __always_inline uint64_t


	Jakub
Jakub Jelinek Nov. 16, 2023, 4:01 p.m. UTC | #9
On Thu, Nov 16, 2023 at 04:59:31PM +0100, Jakub Jelinek wrote:
> ones.  Passes the tst-stdbit.c I've already posted, but also this new
> test which tests unsigned _BitInt.

Oops, forgot to attach it.

	Jakub
/* Test stdbit.h header.
   Copyright (C) 2023 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <https://www.gnu.org/licenses/>.  */

#include <stdbit.h>
#include <stdlib.h>
#include <limits.h>

int
main ()
{
#if BITINT_MAXWIDTH >= 512
  if (stdc_leading_zeros ((unsigned _BitInt(512)) 0) != 512
      || stdc_leading_zeros ((unsigned _BitInt(373)) 0) != 373)
    abort ();
  if (stdc_leading_zeros (~(unsigned _BitInt(512)) 0) != 0
      || stdc_leading_zeros (~(unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_leading_zeros ((unsigned _BitInt(512)) 275) != 512 - 9
      || stdc_leading_zeros ((unsigned _BitInt(373)) 512) != 373 - 10)
    abort ();
  if (stdc_leading_ones ((unsigned _BitInt(512)) 0) != 0
      || stdc_leading_ones ((unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_leading_ones (~(unsigned _BitInt(512)) 0) != 512
      || stdc_leading_ones (~(unsigned _BitInt(373)) 0) != 373)
    abort ();
  if (stdc_leading_ones (~(unsigned _BitInt(512)) 275) != 512 - 9
      || stdc_leading_ones (~(unsigned _BitInt(373)) 512) != 373 - 10)
    abort ();
  if (stdc_trailing_zeros ((unsigned _BitInt(512)) 0) != 512
      || stdc_trailing_zeros ((unsigned _BitInt(373)) 0) != 373)
    abort ();
  if (stdc_trailing_zeros (~(unsigned _BitInt(512)) 0) != 0
      || stdc_trailing_zeros (~(unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_trailing_zeros ((unsigned _BitInt(512)) 256) != 8
      || stdc_trailing_zeros ((unsigned _BitInt(373)) 512) != 9)
    abort ();
  if (stdc_trailing_ones ((unsigned _BitInt(512)) 0) != 0
      || stdc_trailing_ones ((unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_trailing_ones (~(unsigned _BitInt(512)) 0) != 512
      || stdc_trailing_ones (~(unsigned _BitInt(373)) 0) != 373)
    abort ();
  if (stdc_trailing_ones ((unsigned _BitInt(512)) 255) != 8
      || stdc_trailing_ones ((~(unsigned _BitInt(373)) 0) >> 2) != 373 - 2)
    abort ();
  if (stdc_first_leading_zero ((unsigned _BitInt(512)) 0) != 1
      || stdc_first_leading_zero ((unsigned _BitInt(373)) 0) != 1)
    abort ();
  if (stdc_first_leading_zero (~(unsigned _BitInt(512)) 0) != 0
      || stdc_first_leading_zero (~(unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_first_leading_zero (~(unsigned _BitInt(512)) 511) != 512 - 8
      || stdc_first_leading_zero (~(unsigned _BitInt(373)) 1023) != 373 - 9)
    abort ();
  if (stdc_first_leading_one ((unsigned _BitInt(512)) 0) != 0
      || stdc_first_leading_one ((unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_first_leading_one (~(unsigned _BitInt(512)) 0) != 1
      || stdc_first_leading_one (~(unsigned _BitInt(373)) 0) != 1)
    abort ();
  if (stdc_first_leading_one ((unsigned _BitInt(512)) 275) != 512 - 8
      || stdc_first_leading_one ((unsigned _BitInt(373)) 512) != 373 - 9)
    abort ();
  if (stdc_first_trailing_zero ((unsigned _BitInt(512)) 0) != 1
      || stdc_first_trailing_zero ((unsigned _BitInt(373)) 0) != 1)
    abort ();
  if (stdc_first_trailing_zero (~(unsigned _BitInt(512)) 0) != 0
      || stdc_first_trailing_zero (~(unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_first_trailing_zero ((unsigned _BitInt(512)) 255) != 9
      || stdc_first_trailing_zero ((unsigned _BitInt(373)) 511) != 10)
    abort ();
  if (stdc_first_trailing_one ((unsigned _BitInt(512)) 0) != 0
      || stdc_first_trailing_one ((unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_first_trailing_one (~(unsigned _BitInt(512)) 0) != 1
      || stdc_first_trailing_one (~(unsigned _BitInt(373)) 0) != 1)
    abort ();
  if (stdc_first_trailing_one (((unsigned _BitInt(512)) 255) << 175) != 176
      || stdc_first_trailing_one ((~(unsigned _BitInt(373)) 0) << 311) != 312)
    abort ();
  if (stdc_count_zeros ((unsigned _BitInt(512)) 0) != 512
      || stdc_count_zeros ((unsigned _BitInt(373)) 0) != 373)
    abort ();
  if (stdc_count_zeros (~(unsigned _BitInt(512)) 0) != 0
      || stdc_count_zeros (~(unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_count_zeros ((unsigned _BitInt(512)) 1315) != 512 - 5
      || stdc_count_zeros ((unsigned _BitInt(373)) 3363) != 373 - 6)
    abort ();
  if (stdc_count_ones ((unsigned _BitInt(512)) 0) != 0
      || stdc_count_ones ((unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_count_ones (~(unsigned _BitInt(512)) 0) != 512
      || stdc_count_ones (~(unsigned _BitInt(373)) 0) != 373)
    abort ();
  if (stdc_count_ones (~(unsigned _BitInt(512)) 1315) != 512 - 5
      || stdc_count_ones (~(unsigned _BitInt(373)) 3363) != 373 - 6)
    abort ();
  if (stdc_has_single_bit ((unsigned _BitInt(512)) 0)
      || stdc_has_single_bit ((unsigned _BitInt(373)) 0))
    abort ();
  if (!stdc_has_single_bit (((unsigned _BitInt(512)) 1) << 475)
      || !stdc_has_single_bit (((unsigned _BitInt(373)) 1) << 212))
    abort ();
  if (stdc_has_single_bit (((unsigned _BitInt(512)) 1022) << 279)
      || stdc_has_single_bit (((unsigned _BitInt(373)) 12) << 305))
    abort ();
  if (stdc_bit_width ((unsigned _BitInt(512)) 0) != 0
      || stdc_bit_width ((unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_bit_width (~(unsigned _BitInt(512)) 0) != 512
      || stdc_bit_width (~(unsigned _BitInt(373)) 0) != 373)
    abort ();
  if (stdc_bit_width (((unsigned _BitInt(512)) 1023) << 405) != 405 + 10
      || stdc_bit_width (((unsigned _BitInt(373)) 1024) << 242) != 242 + 11)
    abort ();
  if (stdc_bit_floor ((unsigned _BitInt(512)) 0) != 0
      || stdc_bit_floor ((unsigned _BitInt(373)) 0) != 0)
    abort ();
  if (stdc_bit_floor (~(unsigned _BitInt(512)) 0) != ((unsigned _BitInt(512)) 1) << (512 - 1)
      || stdc_bit_floor (~(unsigned _BitInt(373)) 0) != ((unsigned _BitInt(373)) 1) << (373 - 1))
    abort ();
  if (stdc_bit_floor (((unsigned _BitInt(512)) 511) << 405) != (((unsigned _BitInt(512)) 256) << 405)
      || stdc_bit_floor (((unsigned _BitInt(373)) 512) << 242) != (((unsigned _BitInt(512)) 512) << 242))
    abort ();
  if (stdc_bit_ceil ((unsigned _BitInt(512)) 0) != 1
      || stdc_bit_ceil ((unsigned _BitInt(373)) 0) != 1)
    abort ();
  if (stdc_bit_ceil (((unsigned _BitInt(512)) 1) << (512 - 1)) != ((unsigned _BitInt(512)) 1) << (512 - 1)
      || stdc_bit_ceil ((~(unsigned _BitInt(373)) 0) >> 1) != ((unsigned _BitInt(373)) 1) << (373 - 1))
    abort ();
  if (stdc_bit_ceil (((unsigned _BitInt(512)) 512) << 405) != (((unsigned _BitInt(512)) 512) << 405)
      || stdc_bit_ceil (((unsigned _BitInt(373)) 513) << 242) != (((unsigned _BitInt(512)) 1024) << 242))
    abort ();
  if (stdc_bit_floor ((unsigned _BitInt(BITINT_MAXWIDTH)) 0) != 0)
    abort ();
  if (stdc_bit_floor (~(unsigned _BitInt(BITINT_MAXWIDTH)) 0) != ((unsigned _BitInt(BITINT_MAXWIDTH)) 1) << (BITINT_MAXWIDTH - 1))
    abort ();
  if (stdc_bit_floor (((unsigned _BitInt(BITINT_MAXWIDTH)) 511) << 405) != (((unsigned _BitInt(BITINT_MAXWIDTH)) 256) << 405)
      || stdc_bit_floor (((unsigned _BitInt(BITINT_MAXWIDTH)) 512) << 405) != (((unsigned _BitInt(BITINT_MAXWIDTH)) 512) << 405))
    abort ();
  if (stdc_bit_ceil ((unsigned _BitInt(BITINT_MAXWIDTH)) 0) != 1)
    abort ();
  if (stdc_bit_ceil (((unsigned _BitInt(BITINT_MAXWIDTH)) 1) << (BITINT_MAXWIDTH - 1)) != ((unsigned _BitInt(BITINT_MAXWIDTH)) 1) << (BITINT_MAXWIDTH - 1))
    abort ();
  if (stdc_bit_ceil (((unsigned _BitInt(BITINT_MAXWIDTH)) 512) << 405) != (((unsigned _BitInt(BITINT_MAXWIDTH)) 512) << 405)
      || stdc_bit_ceil (((unsigned _BitInt(BITINT_MAXWIDTH)) 513) << 405) != (((unsigned _BitInt(BITINT_MAXWIDTH)) 1024) << 405))
    abort ();
#endif
}
Florian Weimer Nov. 18, 2023, 10:10 a.m. UTC | #10
* Jakub Jelinek:

> +# define __stdc_type_width(x)				\
> +  __builtin_popcountg ((__typeof (x)) ~(__typeof (x)) 0)

> +# define stdc_leading_zeros(x)				\
> +  ((unsigned int)					\
> +   __builtin_clzg (x, __stdc_type_width (x)))

These macros will not be very useful if they expand their arguments
multiple times because the preprocessor output becomes too big if
expressions are nested.  I think we learned that with the type-generic
math facilities.

Thanks,
Florian
Jakub Jelinek Nov. 18, 2023, 10:22 a.m. UTC | #11
On Sat, Nov 18, 2023 at 11:10:56AM +0100, Florian Weimer wrote:
> * Jakub Jelinek:
> 
> > +# define __stdc_type_width(x)				\
> > +  __builtin_popcountg ((__typeof (x)) ~(__typeof (x)) 0)
> 
> > +# define stdc_leading_zeros(x)				\
> > +  ((unsigned int)					\
> > +   __builtin_clzg (x, __stdc_type_width (x)))
> 
> These macros will not be very useful if they expand their arguments
> multiple times because the preprocessor output becomes too big if
> expressions are nested.  I think we learned that with the type-generic
> math facilities.

That is the case of the previously posted macros (some of them) as well:
#define stdc_first_leading_one(x)                       \
  (sizeof (x) == 8 ? stdc_first_leading_one_ull (x)     \
   : sizeof (x) == 4 ? stdc_first_leading_one_ui (x)    \
   : sizeof (x) == 2 ? stdc_first_leading_one_us (x)    \
   : stdc_first_leading_one_uc (x))
Do we really need to add compiler builtins for all those 14 type-generic
macros because of that?
Ok, stdc_first_leading_one with the (__builtin_clzg (x, -1) + 1U)
definition and stdc_first_trailing_one with the (__builtin_ctzg (x, -1) + 1U)
one stdc_count_ones with ((unsigned int) __builtin_popcountg (x))
actually wouldn't need one.

	Jakub
Florian Weimer Nov. 18, 2023, 10:51 a.m. UTC | #12
* Jakub Jelinek:

> On Sat, Nov 18, 2023 at 11:10:56AM +0100, Florian Weimer wrote:
>> * Jakub Jelinek:
>> 
>> > +# define __stdc_type_width(x)				\
>> > +  __builtin_popcountg ((__typeof (x)) ~(__typeof (x)) 0)
>> 
>> > +# define stdc_leading_zeros(x)				\
>> > +  ((unsigned int)					\
>> > +   __builtin_clzg (x, __stdc_type_width (x)))
>> 
>> These macros will not be very useful if they expand their arguments
>> multiple times because the preprocessor output becomes too big if
>> expressions are nested.  I think we learned that with the type-generic
>> math facilities.
>
> That is the case of the previously posted macros (some of them) as well:
> #define stdc_first_leading_one(x)                       \
>   (sizeof (x) == 8 ? stdc_first_leading_one_ull (x)     \
>    : sizeof (x) == 4 ? stdc_first_leading_one_ui (x)    \
>    : sizeof (x) == 2 ? stdc_first_leading_one_us (x)    \
>    : stdc_first_leading_one_uc (x))

> Do we really need to add compiler builtins for all those 14 type-generic
> macros because of that?

Can we use auto?

  #define stdc_first_leading_one(x)                            \
    ({auto __x = (x);                                          \
      sizeof (__x) == 8 ? stdc_first_leading_one_ull (__x)     \
      : sizeof (__x) == 4 ? stdc_first_leading_one_ui (__x)    \
      : sizeof (__x) == 2 ? stdc_first_leading_one_us (__x)    \
      : stdc_first_leading_one_uc (__x))

That would avoid multiple expansions.

Thanks,
Florian
Jakub Jelinek Nov. 18, 2023, 11:09 a.m. UTC | #13
On Sat, Nov 18, 2023 at 11:51:34AM +0100, Florian Weimer wrote:
> * Jakub Jelinek:
> 
> > On Sat, Nov 18, 2023 at 11:10:56AM +0100, Florian Weimer wrote:
> >> * Jakub Jelinek:
> >> 
> >> > +# define __stdc_type_width(x)				\
> >> > +  __builtin_popcountg ((__typeof (x)) ~(__typeof (x)) 0)
> >> 
> >> > +# define stdc_leading_zeros(x)				\
> >> > +  ((unsigned int)					\
> >> > +   __builtin_clzg (x, __stdc_type_width (x)))
> >> 
> >> These macros will not be very useful if they expand their arguments
> >> multiple times because the preprocessor output becomes too big if
> >> expressions are nested.  I think we learned that with the type-generic
> >> math facilities.
> >
> > That is the case of the previously posted macros (some of them) as well:
> > #define stdc_first_leading_one(x)                       \
> >   (sizeof (x) == 8 ? stdc_first_leading_one_ull (x)     \
> >    : sizeof (x) == 4 ? stdc_first_leading_one_ui (x)    \
> >    : sizeof (x) == 2 ? stdc_first_leading_one_us (x)    \
> >    : stdc_first_leading_one_uc (x))
> 
> > Do we really need to add compiler builtins for all those 14 type-generic
> > macros because of that?
> 
> Can we use auto?

Maybe __auto_type, I think while the header is C23 only, we want to make
it usable even in older C modes.

>   #define stdc_first_leading_one(x)                            \
>     ({auto __x = (x);                                          \
>       sizeof (__x) == 8 ? stdc_first_leading_one_ull (__x)     \
>       : sizeof (__x) == 4 ? stdc_first_leading_one_ui (__x)    \
>       : sizeof (__x) == 2 ? stdc_first_leading_one_us (__x)    \
>       : stdc_first_leading_one_uc (__x))
> 
> That would avoid multiple expansions.

I think Joseph wanted to avoid ({ }) as it isn't usable outside of functions
(nor in C++ in template argument lists).  Something like
int a = sizeof (stdc_first_leading_one (0ULL));
is valid C23 I believe, though any of the type-generic macro implementations
which use inline functions for something actually isn't usable in C constant
expressions.

If we wanted to build at least most of the stdc type-generic macros that
can't be done right now without preprocessing arguments more than once
through some smaller building blocks, I think we could have some
__builtin_clzg/__builtin_ctzg variants which would use as second argument
implicitly the bitwidth of the first argument and have some type-generic
builtin which would invert bits of argument (__builtin_invertg) -
~(x) is good enough for bitint types and int and larger, but not for
unsigned char/unsigned short.
Perhaps if we don't want to extend the two former builtins two 3 arguments
or add 2 new builtins for that, we could document that if the second
argument has some special type (not int), it would mean the bit width of
the first argument.  Something like (void *) 0, or 0.0, or
__builtin_type_width (), ...
I think with such extensions we could cover all but stdc_bit_width
(where we want to subtract clzg from the type's bit width) and
stdc_bit_floor/stdc_bit_ceil (which are just complicated).

	Jakub
diff mbox series

Patch

diff --git a/stdlib/stdbit.h b/stdlib/stdbit.h
new file mode 100644
index 0000000000..1baf27953a
--- /dev/null
+++ b/stdlib/stdbit.h
@@ -0,0 +1,1002 @@ 
+/* Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+/*
+ *      ISO C23: 7.18 Bit and byte utilities <stdbit.h>
+ */
+
+#ifndef _STDBIT_H
+#define _STDBIT_H	1
+
+#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
+#include <bits/libc-header-start.h>
+
+__BEGIN_DECLS
+
+#define __need_size_t
+#include <stddef.h>
+#include <bits/stdint-intn.h>
+#include <bits/stdint-uintn.h>
+
+#define __STDC_VERSION_STDBIT_H__ 202311L
+
+#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) \
+    && defined(__ORDER_BIG_ENDIAN__)
+# define __STDC_ENDIAN_LITTLE__ __ORDER_LITTLE_ENDIAN__
+# define __STDC_ENDIAN_BIG__ __ORDER_BIG_ENDIAN__
+# define __STDC_ENDIAN_NATIVE__ __BYTE_ORDER__
+#endif
+
+unsigned int stdc_leading_zeros_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned int stdc_leading_zeros_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_leading_zeros_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned int stdc_leading_zeros_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned int stdc_leading_zeros_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned int stdc_leading_ones_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned int stdc_leading_ones_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_leading_ones_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned int stdc_leading_ones_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned int stdc_leading_ones_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned int stdc_trailing_zeros_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned int stdc_trailing_zeros_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_trailing_zeros_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned int stdc_trailing_zeros_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned int stdc_trailing_zeros_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned int stdc_trailing_ones_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned int stdc_trailing_ones_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_trailing_ones_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned int stdc_trailing_ones_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned int stdc_trailing_ones_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned int stdc_first_leading_zero_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_leading_zero_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_leading_zero_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_leading_zero_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_leading_zero_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned int stdc_first_leading_one_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_leading_one_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_leading_one_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_leading_one_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_leading_one_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned int stdc_first_trailing_zero_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_trailing_zero_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_trailing_zero_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_trailing_zero_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_trailing_zero_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned int stdc_first_trailing_one_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_trailing_one_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_trailing_one_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_trailing_one_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned int stdc_first_trailing_one_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned int stdc_count_zeros_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned int stdc_count_zeros_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_count_zeros_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned int stdc_count_zeros_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned int stdc_count_zeros_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned int stdc_count_ones_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned int stdc_count_ones_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_count_ones_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned int stdc_count_ones_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned int stdc_count_ones_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+_Bool stdc_has_single_bit_uc (unsigned char __value)
+  __THROW __attribute_const__;
+_Bool stdc_has_single_bit_us (unsigned short __value)
+  __THROW __attribute_const__;
+_Bool stdc_has_single_bit_ui (unsigned int __value)
+  __THROW __attribute_const__;
+_Bool stdc_has_single_bit_ul (unsigned long __value)
+  __THROW __attribute_const__;
+_Bool stdc_has_single_bit_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned int stdc_bit_width_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned int stdc_bit_width_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_bit_width_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned int stdc_bit_width_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned int stdc_bit_width_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned char stdc_bit_floor_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned short stdc_bit_floor_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_bit_floor_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned long stdc_bit_floor_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned long long stdc_bit_floor_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+unsigned char stdc_bit_ceil_uc (unsigned char __value)
+  __THROW __attribute_const__;
+unsigned short stdc_bit_ceil_us (unsigned short __value)
+  __THROW __attribute_const__;
+unsigned int stdc_bit_ceil_ui (unsigned int __value)
+  __THROW __attribute_const__;
+unsigned long stdc_bit_ceil_ul (unsigned long __value)
+  __THROW __attribute_const__;
+unsigned long long stdc_bit_ceil_ull (unsigned long long __value)
+  __THROW __attribute_const__;
+
+#if __GNUC_PREREQ (3, 4) && defined(__extern_always_inline)
+__extern_always_inline unsigned int
+__NTH (stdc_leading_zeros_uc (unsigned char __value))
+{
+  return (__value == 0 ? __builtin_popcount ((unsigned char) ~0U)
+	  : __builtin_clz (__value) - __builtin_popcount (~(unsigned char) ~0U));
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_leading_zeros_us (unsigned short __value))
+{
+  return (__value == 0 ? __builtin_popcount ((unsigned short) ~0U)
+	  : __builtin_clz (__value) - __builtin_popcount (~(unsigned short) ~0U));
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_leading_zeros_ui (unsigned int __value))
+{
+  return __value == 0 ? __builtin_popcount (~0U) : __builtin_clz (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_leading_zeros_ul (unsigned long __value))
+{
+  return __value == 0 ? __builtin_popcountl (~0UL) : __builtin_clzl (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_leading_zeros_ull (unsigned long long __value))
+{
+  return (__value == 0 ? __builtin_popcountll (~0ULL)
+	  : __builtin_clzll (__value));
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_leading_ones_uc (unsigned char __value))
+{
+  return stdc_leading_zeros_uc ((unsigned char) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_leading_ones_us (unsigned short __value))
+{
+  return stdc_leading_zeros_us ((unsigned short) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_leading_ones_ui (unsigned int __value))
+{
+  return stdc_leading_zeros_ui ((unsigned int) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_leading_ones_ul (unsigned long __value))
+{
+  return stdc_leading_zeros_ul ((unsigned long) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_leading_ones_ull (unsigned long long __value))
+{
+  return stdc_leading_zeros_ull ((unsigned long long) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_trailing_zeros_uc (unsigned char __value))
+{
+  return (__value == 0 ? __builtin_popcount ((unsigned char) ~0U)
+	  : __builtin_ctz (__value));
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_trailing_zeros_us (unsigned short __value))
+{
+  return (__value == 0 ? __builtin_popcount ((unsigned short) ~0U)
+	  : __builtin_ctz (__value));
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_trailing_zeros_ui (unsigned int __value))
+{
+  return __value == 0 ? __builtin_popcount (~0U) : __builtin_ctz (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_trailing_zeros_ul (unsigned long __value))
+{
+  return __value == 0 ? __builtin_popcountl (~0UL) : __builtin_ctzl (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_trailing_zeros_ull (unsigned long long __value))
+{
+  return (__value == 0 ? __builtin_popcountll (~0ULL)
+	  : __builtin_ctzll (__value));
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_trailing_ones_uc (unsigned char __value))
+{
+  return stdc_trailing_zeros_uc ((unsigned char) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_trailing_ones_us (unsigned short __value))
+{
+  return stdc_trailing_zeros_us ((unsigned short) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_trailing_ones_ui (unsigned int __value))
+{
+  return stdc_trailing_zeros_ui ((unsigned int) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_trailing_ones_ul (unsigned long __value))
+{
+  return stdc_trailing_zeros_ul ((unsigned long) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_trailing_ones_ull (unsigned long long __value))
+{
+  return stdc_trailing_zeros_ull ((unsigned long long) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_leading_one_uc (unsigned char __value))
+{
+  return __value == 0 ? 0 : stdc_leading_zeros_uc (__value) + 1;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_leading_one_us (unsigned short __value))
+{
+  return __value == 0 ? 0 : stdc_leading_zeros_us (__value) + 1;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_leading_one_ui (unsigned int __value))
+{
+  return __value == 0 ? 0 : stdc_leading_zeros_ui (__value) + 1;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_leading_one_ul (unsigned long __value))
+{
+  return __value == 0 ? 0 : stdc_leading_zeros_ul (__value) + 1;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_leading_one_ull (unsigned long long __value))
+{
+  return __value == 0 ? 0 : stdc_leading_zeros_ull (__value) + 1;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_leading_zero_uc (unsigned char __value))
+{
+  return (__value == (unsigned char) ~0 ? 0
+	  : stdc_leading_ones_uc (__value) + 1);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_leading_zero_us (unsigned short __value))
+{
+  return (__value == (unsigned short) ~0 ? 0
+	  : stdc_leading_ones_us (__value) + 1);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_leading_zero_ui (unsigned int __value))
+{
+  return __value == ~0U ? 0 : stdc_leading_ones_ui (__value) + 1;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_leading_zero_ul (unsigned long __value))
+{
+  return __value == ~0UL ? 0 : stdc_leading_ones_ul (__value) + 1;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_leading_zero_ull (unsigned long long __value))
+{
+  return __value == ~0ULL ? 0 : stdc_leading_ones_ull (__value) + 1;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_trailing_one_uc (unsigned char __value))
+{
+  return __builtin_ffs (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_trailing_one_us (unsigned short __value))
+{
+  return __builtin_ffs (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_trailing_one_ui (unsigned int __value))
+{
+  return __builtin_ffs (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_trailing_one_ul (unsigned long __value))
+{
+  return __builtin_ffsl (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_trailing_one_ull (unsigned long long __value))
+{
+  return __builtin_ffsll (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_trailing_zero_uc (unsigned char __value))
+{
+  return (__value == (unsigned char) ~0 ? 0
+	  : stdc_trailing_ones_uc (__value) + 1);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_trailing_zero_us (unsigned short __value))
+{
+  return (__value == (unsigned short) ~0 ? 0
+	  : stdc_trailing_ones_us (__value) + 1);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_trailing_zero_ui (unsigned int __value))
+{
+  return __value == ~0U ? 0 : stdc_trailing_ones_ui (__value) + 1;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_trailing_zero_ul (unsigned long __value))
+{
+  return __value == ~0UL ? 0 : stdc_trailing_ones_ul (__value) + 1;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_first_trailing_zero_ull (unsigned long long __value))
+{
+  return __value == ~0ULL ? 0 : stdc_trailing_ones_ull (__value) + 1;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_count_ones_uc (unsigned char __value))
+{
+  return __builtin_popcount (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_count_ones_us (unsigned short __value))
+{
+  return __builtin_popcount (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_count_ones_ui (unsigned int __value))
+{
+  return __builtin_popcount (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_count_ones_ul (unsigned long __value))
+{
+  return __builtin_popcountl (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_count_ones_ull (unsigned long long __value))
+{
+  return __builtin_popcountll (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_count_zeros_uc (unsigned char __value))
+{
+  return stdc_count_ones_uc ((unsigned char) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_count_zeros_us (unsigned short __value))
+{
+  return stdc_count_ones_us ((unsigned short) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_count_zeros_ui (unsigned int __value))
+{
+  return stdc_count_ones_ui ((unsigned int) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_count_zeros_ul (unsigned long __value))
+{
+  return stdc_count_ones_ul ((unsigned long) ~__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_count_zeros_ull (unsigned long long __value))
+{
+  return stdc_count_ones_ull ((unsigned long long) ~__value);
+}
+
+__extern_always_inline _Bool
+__NTH (stdc_has_single_bit_uc (unsigned char __value))
+{
+  return __value && (__value & (__value - 1)) == 0;
+}
+
+__extern_always_inline _Bool
+__NTH (stdc_has_single_bit_us (unsigned short __value))
+{
+  return __value && (__value & (__value - 1)) == 0;
+}
+
+__extern_always_inline _Bool
+__NTH (stdc_has_single_bit_ui (unsigned int __value))
+{
+  return __value && (__value & (__value - 1)) == 0;
+}
+
+__extern_always_inline _Bool
+__NTH (stdc_has_single_bit_ul (unsigned long __value))
+{
+  return __value && (__value & (__value - 1)) == 0;
+}
+
+__extern_always_inline _Bool
+__NTH (stdc_has_single_bit_ull (unsigned long long __value))
+{
+  return __value && (__value & (__value - 1)) == 0;
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_bit_width_uc (unsigned char __value))
+{
+  return (__builtin_popcount ((unsigned char) ~0U)
+	  - stdc_leading_zeros_uc (__value));
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_bit_width_us (unsigned short __value))
+{
+  return (__builtin_popcount ((unsigned short) ~0U)
+	  - stdc_leading_zeros_us (__value));
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_bit_width_ui (unsigned int __value))
+{
+  return __builtin_popcount (~0U) - stdc_leading_zeros_ui (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_bit_width_ul (unsigned long __value))
+{
+  return __builtin_popcountl (~0UL) - stdc_leading_zeros_ul (__value);
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_bit_width_ull (unsigned long long __value))
+{
+  return __builtin_popcountll (~0ULL) - stdc_leading_zeros_ull (__value);
+}
+
+__extern_always_inline unsigned char
+__NTH (stdc_bit_floor_uc (unsigned char __value))
+{
+  return (__value == 0 ? 0U
+	  : 1U << (__builtin_popcount (~0U) - 1 - __builtin_clz (__value)));
+}
+
+__extern_always_inline unsigned short
+__NTH (stdc_bit_floor_us (unsigned short __value))
+{
+  return (__value == 0 ? 0U
+	  : 1U << (__builtin_popcount (~0U) - 1 - __builtin_clz (__value)));
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_bit_floor_ui (unsigned int __value))
+{
+  return (__value == 0 ? 0U
+	  : 1U << (__builtin_popcount (~0U) - 1 - __builtin_clz (__value)));
+}
+
+__extern_always_inline unsigned long
+__NTH (stdc_bit_floor_ul (unsigned long __value))
+{
+  return (__value == 0 ? 0UL
+	  : 1UL << (__builtin_popcountl (~0UL)
+		    - 1 - __builtin_clzl (__value)));
+}
+
+__extern_always_inline unsigned long long
+__NTH (stdc_bit_floor_ull (unsigned long long __value))
+{
+  return (__value == 0 ? 0ULL
+	  : 1ULL << (__builtin_popcountll (~0ULL)
+		     - 1 - __builtin_clzll (__value)));
+}
+
+__extern_always_inline unsigned char
+__NTH (stdc_bit_ceil_uc (unsigned char __value))
+{
+  return (__value <= 1 ? 1U
+	  : 1U << (__builtin_popcount (~0U) - __builtin_clz (__value - 1)));
+}
+
+__extern_always_inline unsigned short
+__NTH (stdc_bit_ceil_us (unsigned short __value))
+{
+  return (__value <= 1 ? 1U
+	  : 1U << (__builtin_popcount (~0U) - __builtin_clz (__value - 1)));
+}
+
+__extern_always_inline unsigned int
+__NTH (stdc_bit_ceil_ui (unsigned int __value))
+{
+  return (__value <= 1 ? 1U
+	  : 1U << (__builtin_popcount (~0U) - __builtin_clz (__value - 1)));
+}
+
+__extern_always_inline unsigned long
+__NTH (stdc_bit_ceil_ul (unsigned long __value))
+{
+  return (__value <= 1 ? 1UL
+	  : 1UL << (__builtin_popcountl (~0UL)
+		    - __builtin_clzl (__value - 1)));
+}
+
+__extern_always_inline unsigned long long
+__NTH (stdc_bit_ceil_ull (unsigned long long __value))
+{
+  return (__value <= 1 ? 1ULL
+	  : 1ULL << (__builtin_popcountll (~0ULL)
+		     - __builtin_clzll (__value - 1)));
+}
+#endif
+
+#if __glibc_has_builtin (__builtin_clzg) \
+    && __glibc_has_builtin (__builtin_ctzg) \
+    && __glibc_has_builtin (__builtin_popcountg)
+# define __glibc_type_width(value) \
+  __builtin_popcountg ((__typeof (value)) ~(__typeof (value)) 0)
+# define stdc_leading_zeros(value) \
+  ((unsigned int) __builtin_clzg (value, __glibc_type_width (value)))
+# define stdc_leading_ones(value) \
+  ((unsigned int) __builtin_clzg ((__typeof (value)) ~(value), \
+   __glibc_type_width (value)))
+# define stdc_trailing_zeros(value) \
+  ((unsigned int) __builtin_ctzg (value, __glibc_type_width (value)))
+# define stdc_trailing_ones(value) \
+  ((unsigned int) __builtin_ctzg ((__typeof (value)) ~(value), \
+   __glibc_type_width (value)))
+# define stdc_first_leading_zero(value) \
+  ((unsigned int) __builtin_clzg ((__typeof (value)) ~(value), -1) + 1)
+# define stdc_first_leading_one(value) \
+  ((unsigned int) __builtin_clzg (value, -1) + 1)
+# define stdc_first_trailing_zero(value) \
+  ((unsigned int) __builtin_ctzg ((__typeof (value)) ~(value), -1) + 1)
+# define stdc_first_trailing_one(value) \
+  ((unsigned int) __builtin_ctzg (value, -1) + 1)
+# define stdc_count_zeros(value) \
+  ((unsigned int) __builtin_popcountg ((__typeof (value)) ~(value)))
+# define stdc_count_ones(value) \
+  ((unsigned int) __builtin_popcountg (value))
+# define stdc_bit_width(value) \
+  ((unsigned int) (__glibc_type_width (value)				     \
+		   - __builtin_clzg (value, __glibc_type_width (value))))
+# define stdc_has_single_bit(value) \
+  ({ __typeof (value) __stdc_has_single_bit_val = (value);		     \
+     (_Bool) (__stdc_has_single_bit_val 				     \
+	      && (__stdc_has_single_bit_val				     \
+		  & (__stdc_has_single_bit_val - 1)) == 0); })
+# define stdc_bit_floor(value) \
+  ({ __typeof (value) __stdc_bit_floor_val = (value);			     \
+     __stdc_bit_floor_val == 0 ? (__typeof (__stdc_bit_floor_val)) 0	     \
+     : (__typeof (__stdc_bit_floor_val)) 1				     \
+       << (__glibc_type_width (__stdc_bit_floor_val) - 1		     \
+	   - __builtin_clzg (__stdc_bit_floor_val)); })
+# define stdc_bit_ceil(value) \
+  ({ __typeof (value) __stdc_bit_ceil_val = (value);			     \
+     __stdc_bit_ceil_val <= 1 ? (__typeof (__stdc_bit_ceil_val)) 1	     \
+     : (__typeof (__stdc_bit_ceil_val)) 1				     \
+       << (__glibc_type_width (__stdc_bit_ceil_val)			     \
+	   - __builtin_clzg ((__typeof (__stdc_bit_ceil_val))		     \
+			     (__stdc_bit_ceil_val - 1))); })
+#else
+# define stdc_leading_zeros(value) \
+  _Generic ((value),							     \
+	    unsigned char: stdc_leading_zeros_uc ((unsigned char) value),    \
+	    unsigned short: stdc_leading_zeros_us ((unsigned short) (value)),\
+	    unsigned int: stdc_leading_zeros_ui ((unsigned int) (value)),    \
+	    unsigned long: stdc_leading_zeros_ul ((unsigned long) (value)),  \
+	    unsigned long long:						     \
+	     stdc_leading_zeros_ull ((unsigned long long) (value)),	     \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_leading_zeros_uc ((unsigned char) (value))		     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_leading_zeros_us ((unsigned short) (value))	     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_leading_zeros_ui ((unsigned int) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_leading_zeros_ul ((unsigned long) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_leading_zeros_ull ((unsigned long long) (value))	     \
+	      : 0U)
+# define stdc_leading_ones(value) \
+  _Generic ((value),							     \
+	    unsigned char: stdc_leading_ones_uc ((unsigned char) (value)),   \
+	    unsigned short: stdc_leading_ones_us ((unsigned short) (value)), \
+	    unsigned int: stdc_leading_ones_ui ((unsigned int) (value)),     \
+	    unsigned long: stdc_leading_ones_ul ((unsigned long) (value)),   \
+	    unsigned long long:						     \
+	      stdc_leading_ones_ull ((unsigned long long) (value)),	     \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_leading_ones_uc ((unsigned char) (value))		     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_leading_ones_us ((unsigned short) (value))		     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_leading_ones_ui ((unsigned int) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_leading_ones_ul ((unsigned long) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_leading_ones_ull ((unsigned long long) (value))	     \
+	      : 0U)
+# define stdc_trailing_zeros(value) \
+  _Generic ((value),							     \
+	    unsigned char: stdc_trailing_zeros_uc ((unsigned char) (value)), \
+	    unsigned short:						     \
+	      stdc_trailing_zeros_us ((unsigned short) (value)),	     \
+	    unsigned int: stdc_trailing_zeros_ui ((unsigned int) (value)),   \
+	    unsigned long: stdc_trailing_zeros_ul ((unsigned long) (value)), \
+	    unsigned long long:						     \
+	      stdc_trailing_zeros_ull ((unsigned long long) (value)),	     \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_trailing_zeros_uc ((unsigned char) (value))	     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_trailing_zeros_us ((unsigned short) (value))	     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_trailing_zeros_ui ((unsigned int) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_trailing_zeros_ul ((unsigned long) (value))	     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_trailing_zeros_ull ((unsigned long long) (value))	     \
+	      : 0U)
+# define stdc_trailing_ones(value) \
+  _Generic ((value),							     \
+	    unsigned char: stdc_trailing_ones_uc ((unsigned char) (value)),  \
+	    unsigned short: stdc_trailing_ones_us ((unsigned short) (value)),\
+	    unsigned int: stdc_trailing_ones_ui ((unsigned int) (value)),    \
+	    unsigned long: stdc_trailing_ones_ul ((unsigned long) (value)),  \
+	    unsigned long long:						     \
+	      stdc_trailing_ones_ull ((unsigned long long) (value)),	     \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_trailing_ones_uc ((unsigned char) (value))		     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_trailing_ones_us ((unsigned short) (value))	     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_trailing_ones_ui ((unsigned int) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_trailing_ones_ul ((unsigned long) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_trailing_ones_ull ((unsigned long long) (value))	     \
+	      : 0U)
+# define stdc_first_leading_zero(value) \
+  _Generic ((value),							     \
+	    unsigned char:						     \
+	      stdc_first_leading_zero_uc ((unsigned char) (value)),	     \
+	    unsigned short:						     \
+	      stdc_first_leading_zero_us ((unsigned short) (value)),	     \
+	    unsigned int:						     \
+	      stdc_first_leading_zero_ui ((unsigned int) (value)),	     \
+	    unsigned long:						     \
+	      stdc_first_leading_zero_ul ((unsigned long) (value)),	     \
+	    unsigned long long:						     \
+	      stdc_first_leading_zero_ull ((unsigned long long) (value)),    \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_first_leading_zero_uc ((unsigned char) (value))	     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_first_leading_zero_us ((unsigned short) (value))	     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_first_leading_zero_ui ((unsigned int) (value))	     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_first_leading_zero_ul ((unsigned long) (value))	     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_first_leading_zero_ull ((unsigned long long) (value))   \
+	      : 0U)
+# define stdc_first_leading_one(value) \
+  _Generic ((value),							     \
+	    unsigned char:						     \
+	      stdc_first_leading_one_uc ((unsigned char) (value)),	     \
+	    unsigned short:						     \
+	      stdc_first_leading_one_us ((unsigned short) (value)),	     \
+	    unsigned int: stdc_first_leading_one_ui ((unsigned int) (value)),\
+	    unsigned long:						     \
+	      stdc_first_leading_one_ul ((unsigned long) (value)),	     \
+	    unsigned long long:						     \
+	      stdc_first_leading_one_ull ((unsigned long long) (value)),     \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_first_leading_one_uc ((unsigned char) (value))	     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_first_leading_one_us ((unsigned short) (value))	     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_first_leading_one_ui ((unsigned int) (value))	     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_first_leading_one_ul ((unsigned long) (value))	     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_first_leading_one_ull ((unsigned long long) (value))    \
+	      : 0U)
+# define stdc_first_trailing_zero(value) \
+  _Generic ((value),							     \
+	    unsigned char:						     \
+	      stdc_first_trailing_zero_uc ((unsigned char) (value)),	     \
+	    unsigned short:						     \
+	      stdc_first_trailing_zero_us ((unsigned short) (value)),	     \
+	    unsigned int:						     \
+	      stdc_first_trailing_zero_ui ((unsigned int) (value)),	     \
+	    unsigned long:						     \
+	      stdc_first_trailing_zero_ul ((unsigned long) (value)),	     \
+	    unsigned long long:						     \
+	      stdc_first_trailing_zero_ull ((unsigned long long) (value)),   \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_first_trailing_zero_uc ((unsigned char) (value))	     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_first_trailing_zero_us ((unsigned short) (value))	     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_first_trailing_zero_ui ((unsigned int) (value))	     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_first_trailing_zero_ul ((unsigned long) (value))	     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_first_trailing_zero_ull ((unsigned long long) (value))  \
+	      : 0U)
+# define stdc_first_trailing_one(value) \
+  _Generic ((value),							     \
+	    unsigned char:						     \
+	      stdc_first_trailing_one_uc ((unsigned char) (value)),	     \
+	    unsigned short:						     \
+	      stdc_first_trailing_one_us ((unsigned short) (value)),	     \
+	    unsigned int:						     \
+	      stdc_first_trailing_one_ui ((unsigned int) (value)),	     \
+	    unsigned long:						     \
+	      stdc_first_trailing_one_ul ((unsigned long) (value)),	     \
+	    unsigned long long:						     \
+	      stdc_first_trailing_one_ull ((unsigned long long) (value)),    \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_first_trailing_one_uc ((unsigned char) (value))	     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_first_trailing_one_us ((unsigned short) (value))	     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_first_trailing_one_ui ((unsigned int) (value))	     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_first_trailing_one_ul ((unsigned long) (value))	     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_first_trailing_one_ull ((unsigned long long) (value))   \
+	      : 0U)
+# define stdc_count_zeros(value) \
+  _Generic ((value),							     \
+	    unsigned char: stdc_count_zeros_uc ((unsigned char) (value)),    \
+	    unsigned short: stdc_count_zeros_us ((unsigned short) (value)),  \
+	    unsigned int: stdc_count_zeros_ui ((unsigned int) (value)),	     \
+	    unsigned long: stdc_count_zeros_ul ((unsigned long) (value)),    \
+	    unsigned long long:						     \
+	      stdc_count_zeros_ull ((unsigned long long) (value)),	     \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_count_zeros_uc ((unsigned char) (value))		     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_count_zeros_us ((unsigned short) (value))		     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_count_zeros_ui ((unsigned int) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_count_zeros_ul ((unsigned long) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_count_zeros_ull ((unsigned long long) (value))	     \
+	      : 0U)
+# define stdc_count_ones(value) \
+  _Generic ((value),							     \
+	    unsigned char: stdc_count_ones_uc ((unsigned char) (value)),     \
+	    unsigned short: stdc_count_ones_us ((unsigned short) (value)),   \
+	    unsigned int: stdc_count_ones_ui ((unsigned int) (value)),	     \
+	    unsigned long: stdc_count_ones_ul ((unsigned long) (value)),     \
+	    unsigned long long:						     \
+	      stdc_count_ones_ull ((unsigned long long) (value)),	     \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_count_ones_uc ((unsigned char) (value))		     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_count_ones_us ((unsigned short) (value))		     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_count_ones_ui ((unsigned int) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_count_ones_ul ((unsigned long) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_count_ones_ull ((unsigned long long) (value))	     \
+	      : 0U)
+# define stdc_has_single_bit(value) \
+  _Generic ((value),							     \
+	    unsigned char: stdc_has_single_bit_uc ((unsigned char) (value)), \
+	    unsigned short:						     \
+	      stdc_has_single_bit_us ((unsigned short) (value)),	     \
+	    unsigned int: stdc_has_single_bit_ui ((unsigned int) (value)),   \
+	    unsigned long: stdc_has_single_bit_ul ((unsigned long) (value)), \
+	    unsigned long long:						     \
+	      stdc_has_single_bit_ull ((unsigned long long) (value)),	     \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_has_single_bit_uc ((unsigned char) (value))	     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_has_single_bit_us ((unsigned short) (value))	     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_has_single_bit_ui ((unsigned int) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_has_single_bit_ul ((unsigned long) (value))	     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_has_single_bit_ull ((unsigned long long) (value))	     \
+	      : (_Bool) 0)
+# define stdc_bit_width(value) \
+  _Generic ((value),							     \
+	    unsigned char: stdc_bit_width_uc ((unsigned char) (value)),	     \
+	    unsigned short: stdc_bit_width_us ((unsigned short) (value)),    \
+	    unsigned int: stdc_bit_width_ui ((unsigned int) (value)),	     \
+	    unsigned long: stdc_bit_width_ul ((unsigned long) (value)),	     \
+	    unsigned long long:						     \
+	      stdc_bit_width_ull ((unsigned long long) (value)),	     \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? stdc_bit_width_uc ((unsigned char) (value))		     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? stdc_bit_width_us ((unsigned short) (value))		     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? stdc_bit_width_ui ((unsigned int) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? stdc_bit_width_ul ((unsigned long) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? stdc_bit_width_ull ((unsigned long long) (value))	     \
+	      : 0U)
+# define stdc_bit_floor(value) \
+  _Generic ((value),							     \
+	    unsigned char: stdc_bit_floor_uc ((unsigned char) (value)),	     \
+	    unsigned short: stdc_bit_floor_us ((unsigned short) (value)),    \
+	    unsigned int: stdc_bit_floor_ui ((unsigned int) (value)),	     \
+	    unsigned long: stdc_bit_floor_ul ((unsigned long) (value)),	     \
+	    unsigned long long:						     \
+	      stdc_bit_floor_ull ((unsigned long long) (value)),	     \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? (__typeof (value))					     \
+		stdc_bit_floor_uc ((unsigned char) (value))		     \
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? (__typeof (value))					     \
+		stdc_bit_floor_us ((unsigned short) (value))		     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? (__typeof (value)) stdc_bit_floor_ui ((unsigned int) (value))\
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? (__typeof (value))					     \
+		stdc_bit_floor_ul ((unsigned long) (value))		     \
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? (__typeof (value))					     \
+		stdc_bit_floor_ull ((unsigned long long) (value))	     \
+	      : 0U)
+# define stdc_bit_ceil(value) \
+  _Generic ((value),							     \
+	    unsigned char: stdc_bit_ceil_uc ((unsigned char) (value)),	     \
+	    unsigned short: stdc_bit_ceil_us ((unsigned short) (value)),     \
+	    unsigned int: stdc_bit_ceil_ui ((unsigned int) (value)),	     \
+	    unsigned long: stdc_bit_ceil_ul ((unsigned long) (value)),	     \
+	    unsigned long long:						     \
+	      stdc_bit_ceil_ull ((unsigned long long) (value)),		     \
+	    default:							     \
+	      sizeof (value) == sizeof (unsigned char)			     \
+	      ? (__typeof (value)) stdc_bit_ceil_uc ((unsigned char) (value))\
+	      : sizeof (value) == sizeof (unsigned short)		     \
+	      ? (__typeof (value))					     \
+		stdc_bit_ceil_us ((unsigned short) (value))		     \
+	      : sizeof (value) == sizeof (unsigned int)			     \
+	      ? (__typeof (value)) stdc_bit_ceil_ui ((unsigned int) (value)) \
+	      : sizeof (value) == sizeof (unsigned long)		     \
+	      ? (__typeof (value)) stdc_bit_ceil_ul ((unsigned long) (value))\
+	      : sizeof (value) == sizeof (unsigned long long)		     \
+	      ? (__typeof (value))					     \
+		stdc_bit_ceil_ull ((unsigned long long) (value))	     \
+	      : 0U)
+#endif
+
+__END_DECLS
+
+#endif /* stdbit.h */
diff --git a/stdlib/tst-stdbit.c b/stdlib/tst-stdbit.c
new file mode 100644
index 0000000000..95930d1b09
--- /dev/null
+++ b/stdlib/tst-stdbit.c
@@ -0,0 +1,488 @@ 
+/* Test stdbit.h header.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdbit.h>
+#include <stdlib.h>
+#include <limits.h>
+
+int
+main ()
+{
+  if (stdc_leading_zeros_uc (0) != UCHAR_WIDTH
+      || stdc_leading_zeros ((unsigned char) 0) != UCHAR_WIDTH
+      || stdc_leading_zeros_us (0) != USHRT_WIDTH
+      || stdc_leading_zeros ((unsigned short) 0) != USHRT_WIDTH
+      || stdc_leading_zeros_ui (0) != UINT_WIDTH
+      || stdc_leading_zeros (0U) != UINT_WIDTH
+      || stdc_leading_zeros_ul (0) != ULONG_WIDTH
+      || stdc_leading_zeros (0UL) != ULONG_WIDTH
+      || stdc_leading_zeros_ull (0) != ULLONG_WIDTH
+      || stdc_leading_zeros (0ULL) != ULLONG_WIDTH)
+    abort ();
+  if (stdc_leading_zeros_uc ((unsigned char) ~0U) != 0
+      || stdc_leading_zeros ((unsigned char) ~0U) != 0
+      || stdc_leading_zeros_us ((unsigned short) ~0U) != 0
+      || stdc_leading_zeros ((unsigned short) ~0U) != 0
+      || stdc_leading_zeros_ui (~0U) != 0
+      || stdc_leading_zeros (~0U) != 0
+      || stdc_leading_zeros_ul (~0UL) != 0
+      || stdc_leading_zeros (~0UL) != 0
+      || stdc_leading_zeros_ull (~0ULL) != 0
+      || stdc_leading_zeros (~0ULL) != 0)
+    abort ();
+  if (stdc_leading_zeros_uc (1) != UCHAR_WIDTH - 1
+      || stdc_leading_zeros ((unsigned char) 3) != UCHAR_WIDTH - 2
+      || stdc_leading_zeros_us (5) != USHRT_WIDTH - 3
+      || stdc_leading_zeros ((unsigned short) 9) != USHRT_WIDTH - 4
+      || stdc_leading_zeros_ui (16) != UINT_WIDTH - 5
+      || stdc_leading_zeros (34U) != UINT_WIDTH - 6
+      || stdc_leading_zeros_ul (65) != ULONG_WIDTH - 7
+      || stdc_leading_zeros (130UL) != ULONG_WIDTH - 8
+      || stdc_leading_zeros_ull (275) != ULLONG_WIDTH - 9
+      || stdc_leading_zeros (512ULL) != ULLONG_WIDTH - 10)
+    abort ();
+  if (stdc_leading_ones_uc (0) != 0
+      || stdc_leading_ones ((unsigned char) 0) != 0
+      || stdc_leading_ones_us (0) != 0
+      || stdc_leading_ones ((unsigned short) 0) != 0
+      || stdc_leading_ones_ui (0) != 0
+      || stdc_leading_ones (0U) != 0
+      || stdc_leading_ones_ul (0) != 0
+      || stdc_leading_ones (0UL) != 0
+      || stdc_leading_ones_ull (0) != 0
+      || stdc_leading_ones (0ULL) != 0)
+    abort ();
+  if (stdc_leading_ones_uc ((unsigned char) ~0U) != UCHAR_WIDTH
+      || stdc_leading_ones ((unsigned char) ~0U) != UCHAR_WIDTH
+      || stdc_leading_ones_us ((unsigned short) ~0U) != USHRT_WIDTH
+      || stdc_leading_ones ((unsigned short) ~0U) != USHRT_WIDTH
+      || stdc_leading_ones_ui (~0U) != UINT_WIDTH
+      || stdc_leading_ones (~0U) != UINT_WIDTH
+      || stdc_leading_ones_ul (~0UL) != ULONG_WIDTH
+      || stdc_leading_ones (~0UL) != ULONG_WIDTH
+      || stdc_leading_ones_ull (~0ULL) != ULLONG_WIDTH
+      || stdc_leading_ones (~0ULL) != ULLONG_WIDTH)
+    abort ();
+  if (stdc_leading_ones_uc (~1) != UCHAR_WIDTH - 1
+      || stdc_leading_ones ((unsigned char) ~3) != UCHAR_WIDTH - 2
+      || stdc_leading_ones_us (~5) != USHRT_WIDTH - 3
+      || stdc_leading_ones ((unsigned short) ~9) != USHRT_WIDTH - 4
+      || stdc_leading_ones_ui (~16) != UINT_WIDTH - 5
+      || stdc_leading_ones (~34U) != UINT_WIDTH - 6
+      || stdc_leading_ones_ul (~65UL) != ULONG_WIDTH - 7
+      || stdc_leading_ones (~130UL) != ULONG_WIDTH - 8
+      || stdc_leading_ones_ull (~275ULL) != ULLONG_WIDTH - 9
+      || stdc_leading_ones (~512ULL) != ULLONG_WIDTH - 10)
+    abort ();
+  if (stdc_trailing_zeros_uc (0) != UCHAR_WIDTH
+      || stdc_trailing_zeros ((unsigned char) 0) != UCHAR_WIDTH
+      || stdc_trailing_zeros_us (0) != USHRT_WIDTH
+      || stdc_trailing_zeros ((unsigned short) 0) != USHRT_WIDTH
+      || stdc_trailing_zeros_ui (0) != UINT_WIDTH
+      || stdc_trailing_zeros (0U) != UINT_WIDTH
+      || stdc_trailing_zeros_ul (0) != ULONG_WIDTH
+      || stdc_trailing_zeros (0UL) != ULONG_WIDTH
+      || stdc_trailing_zeros_ull (0) != ULLONG_WIDTH
+      || stdc_trailing_zeros (0ULL) != ULLONG_WIDTH)
+    abort ();
+  if (stdc_trailing_zeros_uc ((unsigned char) ~0U) != 0
+      || stdc_trailing_zeros ((unsigned char) ~0U) != 0
+      || stdc_trailing_zeros_us ((unsigned short) ~0U) != 0
+      || stdc_trailing_zeros ((unsigned short) ~0U) != 0
+      || stdc_trailing_zeros_ui (~0U) != 0
+      || stdc_trailing_zeros (~0U) != 0
+      || stdc_trailing_zeros_ul (~0UL) != 0
+      || stdc_trailing_zeros (~0UL) != 0
+      || stdc_trailing_zeros_ull (~0ULL) != 0
+      || stdc_trailing_zeros (~0ULL) != 0)
+    abort ();
+  if (stdc_trailing_zeros_uc (1) != 0
+      || stdc_trailing_zeros ((unsigned char) 2) != 1
+      || stdc_trailing_zeros_us (4) != 2
+      || stdc_trailing_zeros ((unsigned short) 24) != 3
+      || stdc_trailing_zeros_ui (16) != 4
+      || stdc_trailing_zeros (32U) != 5
+      || stdc_trailing_zeros_ul (192) != 6
+      || stdc_trailing_zeros (128UL) != 7
+      || stdc_trailing_zeros_ull (256) != 8
+      || stdc_trailing_zeros (512ULL) != 9)
+    abort ();
+  if (stdc_trailing_ones_uc (0) != 0
+      || stdc_trailing_ones ((unsigned char) 0) != 0
+      || stdc_trailing_ones_us (0) != 0
+      || stdc_trailing_ones ((unsigned short) 0) != 0
+      || stdc_trailing_ones_ui (0) != 0
+      || stdc_trailing_ones (0U) != 0
+      || stdc_trailing_ones_ul (0) != 0
+      || stdc_trailing_ones (0UL) != 0
+      || stdc_trailing_ones_ull (0) != 0
+      || stdc_trailing_ones (0ULL) != 0)
+    abort ();
+  if (stdc_trailing_ones_uc ((unsigned char) ~0U) != UCHAR_WIDTH
+      || stdc_trailing_ones ((unsigned char) ~0U) != UCHAR_WIDTH
+      || stdc_trailing_ones_us ((unsigned short) ~0U) != USHRT_WIDTH
+      || stdc_trailing_ones ((unsigned short) ~0U) != USHRT_WIDTH
+      || stdc_trailing_ones_ui (~0U) != UINT_WIDTH
+      || stdc_trailing_ones (~0U) != UINT_WIDTH
+      || stdc_trailing_ones_ul (~0UL) != ULONG_WIDTH
+      || stdc_trailing_ones (~0UL) != ULONG_WIDTH
+      || stdc_trailing_ones_ull (~0ULL) != ULLONG_WIDTH
+      || stdc_trailing_ones (~0ULL) != ULLONG_WIDTH)
+    abort ();
+  if (stdc_trailing_ones_uc (7) != 3
+      || stdc_trailing_ones ((unsigned char) 5) != 1
+      || stdc_trailing_ones_us (6) != 0
+      || stdc_trailing_ones ((unsigned short) 15) != 4
+      || stdc_trailing_ones_ui (31 | 128) != 5
+      || stdc_trailing_ones (127U) != 7
+      || stdc_trailing_ones_ul (255UL & ~32UL) != 5
+      || stdc_trailing_ones (511UL) != 9
+      || stdc_trailing_ones_ull (255ULL) != 8
+      || stdc_trailing_ones (~0ULL >> 2) != ULLONG_WIDTH - 2)
+    abort ();
+  if (stdc_first_leading_zero_uc (0) != 1
+      || stdc_first_leading_zero ((unsigned char) 0) != 1
+      || stdc_first_leading_zero_us (0) != 1
+      || stdc_first_leading_zero ((unsigned short) 0) != 1
+      || stdc_first_leading_zero_ui (0) != 1
+      || stdc_first_leading_zero (0U) != 1
+      || stdc_first_leading_zero_ul (0) != 1
+      || stdc_first_leading_zero (0UL) != 1
+      || stdc_first_leading_zero_ull (0) != 1
+      || stdc_first_leading_zero (0ULL) != 1)
+    abort ();
+  if (stdc_first_leading_zero_uc ((unsigned char) ~0U) != 0
+      || stdc_first_leading_zero ((unsigned char) ~0U) != 0
+      || stdc_first_leading_zero_us ((unsigned short) ~0U) != 0
+      || stdc_first_leading_zero ((unsigned short) ~0U) != 0
+      || stdc_first_leading_zero_ui (~0U) != 0
+      || stdc_first_leading_zero (~0U) != 0
+      || stdc_first_leading_zero_ul (~0UL) != 0
+      || stdc_first_leading_zero (~0UL) != 0
+      || stdc_first_leading_zero_ull (~0ULL) != 0
+      || stdc_first_leading_zero (~0ULL) != 0)
+    abort ();
+  if (stdc_first_leading_zero_uc ((unsigned char) ~1U) != UCHAR_WIDTH
+      || stdc_first_leading_zero ((unsigned char) ~3U) != UCHAR_WIDTH - 1
+      || stdc_first_leading_zero_us ((unsigned short) ~7U) != USHRT_WIDTH - 2
+      || stdc_first_leading_zero ((unsigned short) ~15U) != USHRT_WIDTH - 3
+      || stdc_first_leading_zero_ui (~31U) != UINT_WIDTH - 4
+      || stdc_first_leading_zero (~63U) != UINT_WIDTH - 5
+      || stdc_first_leading_zero_ul (~127UL) != ULONG_WIDTH - 6
+      || stdc_first_leading_zero (~255UL) != ULONG_WIDTH - 7
+      || stdc_first_leading_zero_ull (~511ULL) != ULLONG_WIDTH - 8
+      || stdc_first_leading_zero (~1023ULL) != ULLONG_WIDTH - 9)
+    abort ();
+  if (stdc_first_leading_one_uc (0) != 0
+      || stdc_first_leading_one ((unsigned char) 0) != 0
+      || stdc_first_leading_one_us (0) != 0
+      || stdc_first_leading_one ((unsigned short) 0) != 0
+      || stdc_first_leading_one_ui (0) != 0
+      || stdc_first_leading_one (0U) != 0
+      || stdc_first_leading_one_ul (0) != 0
+      || stdc_first_leading_one (0UL) != 0
+      || stdc_first_leading_one_ull (0) != 0
+      || stdc_first_leading_one (0ULL) != 0)
+    abort ();
+  if (stdc_first_leading_one_uc ((unsigned char) ~0U) != 1
+      || stdc_first_leading_one ((unsigned char) ~0U) != 1
+      || stdc_first_leading_one_us ((unsigned short) ~0U) != 1
+      || stdc_first_leading_one ((unsigned short) ~0U) != 1
+      || stdc_first_leading_one_ui (~0U) != 1
+      || stdc_first_leading_one (~0U) != 1
+      || stdc_first_leading_one_ul (~0UL) != 1
+      || stdc_first_leading_one (~0UL) != 1
+      || stdc_first_leading_one_ull (~0ULL) != 1
+      || stdc_first_leading_one (~0ULL) != 1)
+    abort ();
+  if (stdc_first_leading_one_uc (1) != UCHAR_WIDTH
+      || stdc_first_leading_one ((unsigned char) 3) != UCHAR_WIDTH - 1
+      || stdc_first_leading_one_us (5) != USHRT_WIDTH - 2
+      || stdc_first_leading_one ((unsigned short) 9) != USHRT_WIDTH - 3
+      || stdc_first_leading_one_ui (16) != UINT_WIDTH - 4
+      || stdc_first_leading_one (34U) != UINT_WIDTH - 5
+      || stdc_first_leading_one_ul (65UL) != ULONG_WIDTH - 6
+      || stdc_first_leading_one (130UL) != ULONG_WIDTH - 7
+      || stdc_first_leading_one_ull (275ULL) != ULLONG_WIDTH - 8
+      || stdc_first_leading_one (512ULL) != ULLONG_WIDTH - 9)
+    abort ();
+  if (stdc_first_trailing_zero_uc (0) != 1
+      || stdc_first_trailing_zero ((unsigned char) 0) != 1
+      || stdc_first_trailing_zero_us (0) != 1
+      || stdc_first_trailing_zero ((unsigned short) 0) != 1
+      || stdc_first_trailing_zero_ui (0) != 1
+      || stdc_first_trailing_zero (0U) != 1
+      || stdc_first_trailing_zero_ul (0) != 1
+      || stdc_first_trailing_zero (0UL) != 1
+      || stdc_first_trailing_zero_ull (0) != 1
+      || stdc_first_trailing_zero (0ULL) != 1)
+    abort ();
+  if (stdc_first_trailing_zero_uc ((unsigned char) ~0U) != 0
+      || stdc_first_trailing_zero ((unsigned char) ~0U) != 0
+      || stdc_first_trailing_zero_us ((unsigned short) ~0U) != 0
+      || stdc_first_trailing_zero ((unsigned short) ~0U) != 0
+      || stdc_first_trailing_zero_ui (~0U) != 0
+      || stdc_first_trailing_zero (~0U) != 0
+      || stdc_first_trailing_zero_ul (~0UL) != 0
+      || stdc_first_trailing_zero (~0UL) != 0
+      || stdc_first_trailing_zero_ull (~0ULL) != 0
+      || stdc_first_trailing_zero (~0ULL) != 0)
+    abort ();
+  if (stdc_first_trailing_zero_uc (1) != 2
+      || stdc_first_trailing_zero ((unsigned char) 2) != 1
+      || stdc_first_trailing_zero_us (7) != 4
+      || stdc_first_trailing_zero ((unsigned short) 15) != 5
+      || stdc_first_trailing_zero_ui (31) != 6
+      || stdc_first_trailing_zero (63U) != 7
+      || stdc_first_trailing_zero_ul (127U | 512U) != 8
+      || stdc_first_trailing_zero (128UL) != 1
+      || stdc_first_trailing_zero_ull (255) != 9
+      || stdc_first_trailing_zero (511ULL) != 10)
+    abort ();
+  if (stdc_first_trailing_one_uc (0) != 0
+      || stdc_first_trailing_one ((unsigned char) 0) != 0
+      || stdc_first_trailing_one_us (0) != 0
+      || stdc_first_trailing_one ((unsigned short) 0) != 0
+      || stdc_first_trailing_one_ui (0) != 0
+      || stdc_first_trailing_one (0U) != 0
+      || stdc_first_trailing_one_ul (0) != 0
+      || stdc_first_trailing_one (0UL) != 0
+      || stdc_first_trailing_one_ull (0) != 0
+      || stdc_first_trailing_one (0ULL) != 0)
+    abort ();
+  if (stdc_first_trailing_one_uc ((unsigned char) ~0U) != 1
+      || stdc_first_trailing_one ((unsigned char) ~0U) != 1
+      || stdc_first_trailing_one_us ((unsigned short) ~0U) != 1
+      || stdc_first_trailing_one ((unsigned short) ~0U) != 1
+      || stdc_first_trailing_one_ui (~0U) != 1
+      || stdc_first_trailing_one (~0U) != 1
+      || stdc_first_trailing_one_ul (~0UL) != 1
+      || stdc_first_trailing_one (~0UL) != 1
+      || stdc_first_trailing_one_ull (~0ULL) != 1
+      || stdc_first_trailing_one (~0ULL) != 1)
+    abort ();
+  if (stdc_first_trailing_one_uc (7) != 1
+      || stdc_first_trailing_one ((unsigned char) 4) != 3
+      || stdc_first_trailing_one_us (6) != 2
+      || stdc_first_trailing_one ((unsigned short) 96) != 6
+      || stdc_first_trailing_one_ui (128) != 8
+      || stdc_first_trailing_one (127U) != 1
+      || stdc_first_trailing_one_ul (255UL & ~31UL) != 6
+      || stdc_first_trailing_one (511UL) != 1
+      || stdc_first_trailing_one_ull (255ULL << 3) != 4
+      || stdc_first_trailing_one (~0ULL << 12) != 13)
+    abort ();
+  if (stdc_count_zeros_uc (0) != UCHAR_WIDTH
+      || stdc_count_zeros ((unsigned char) 0) != UCHAR_WIDTH
+      || stdc_count_zeros_us (0) != USHRT_WIDTH
+      || stdc_count_zeros ((unsigned short) 0) != USHRT_WIDTH
+      || stdc_count_zeros_ui (0) != UINT_WIDTH
+      || stdc_count_zeros (0U) != UINT_WIDTH
+      || stdc_count_zeros_ul (0) != ULONG_WIDTH
+      || stdc_count_zeros (0UL) != ULONG_WIDTH
+      || stdc_count_zeros_ull (0) != ULLONG_WIDTH
+      || stdc_count_zeros (0ULL) != ULLONG_WIDTH)
+    abort ();
+  if (stdc_count_zeros_uc ((unsigned char) ~0U) != 0
+      || stdc_count_zeros ((unsigned char) ~0U) != 0
+      || stdc_count_zeros_us ((unsigned short) ~0U) != 0
+      || stdc_count_zeros ((unsigned short) ~0U) != 0
+      || stdc_count_zeros_ui (~0U) != 0
+      || stdc_count_zeros (~0U) != 0
+      || stdc_count_zeros_ul (~0UL) != 0
+      || stdc_count_zeros (~0UL) != 0
+      || stdc_count_zeros_ull (~0ULL) != 0
+      || stdc_count_zeros (~0ULL) != 0)
+    abort ();
+  if (stdc_count_zeros_uc ((unsigned char) ~1U) != 1
+      || stdc_count_zeros ((unsigned char) 1U) != UCHAR_WIDTH - 1
+      || stdc_count_zeros_us ((unsigned short) 5U) != USHRT_WIDTH - 2
+      || stdc_count_zeros ((unsigned short) 42) != USHRT_WIDTH - 3
+      || stdc_count_zeros_ui (~42U) != 3
+      || stdc_count_zeros (291U) != UINT_WIDTH - 4
+      || stdc_count_zeros_ul (~291UL) != 4
+      || stdc_count_zeros (~1315UL) != 5
+      || stdc_count_zeros_ull (1315ULL) != ULLONG_WIDTH - 5
+      || stdc_count_zeros (3363ULL) != ULLONG_WIDTH - 6)
+    abort ();
+  if (stdc_count_ones_uc (0) != 0
+      || stdc_count_ones ((unsigned char) 0) != 0
+      || stdc_count_ones_us (0) != 0
+      || stdc_count_ones ((unsigned short) 0) != 0
+      || stdc_count_ones_ui (0) != 0
+      || stdc_count_ones (0U) != 0
+      || stdc_count_ones_ul (0) != 0
+      || stdc_count_ones (0UL) != 0
+      || stdc_count_ones_ull (0) != 0
+      || stdc_count_ones (0ULL) != 0)
+    abort ();
+  if (stdc_count_ones_uc ((unsigned char) ~0U) != UCHAR_WIDTH
+      || stdc_count_ones ((unsigned char) ~0U) != UCHAR_WIDTH
+      || stdc_count_ones_us ((unsigned short) ~0U) != USHRT_WIDTH
+      || stdc_count_ones ((unsigned short) ~0U) != USHRT_WIDTH
+      || stdc_count_ones_ui (~0U) != UINT_WIDTH
+      || stdc_count_ones (~0U) != UINT_WIDTH
+      || stdc_count_ones_ul (~0UL) != ULONG_WIDTH
+      || stdc_count_ones (~0UL) != ULONG_WIDTH
+      || stdc_count_ones_ull (~0ULL) != ULLONG_WIDTH
+      || stdc_count_ones (~0ULL) != ULLONG_WIDTH)
+    abort ();
+  if (stdc_count_ones_uc ((unsigned char) 1U) != 1
+      || stdc_count_ones ((unsigned char) ~1U) != UCHAR_WIDTH - 1
+      || stdc_count_ones_us ((unsigned short) ~5U) != USHRT_WIDTH - 2
+      || stdc_count_ones ((unsigned short) ~42) != USHRT_WIDTH - 3
+      || stdc_count_ones_ui (42U) != 3
+      || stdc_count_ones (~291U) != UINT_WIDTH - 4
+      || stdc_count_ones_ul (291UL) != 4
+      || stdc_count_ones (1315UL) != 5
+      || stdc_count_ones_ull (~1315ULL) != ULLONG_WIDTH - 5
+      || stdc_count_ones (~3363ULL) != ULLONG_WIDTH - 6)
+    abort ();
+  if (stdc_has_single_bit_uc (0)
+      || stdc_has_single_bit ((unsigned char) 0)
+      || stdc_has_single_bit_us (0)
+      || stdc_has_single_bit ((unsigned short) 0)
+      || stdc_has_single_bit_ui (0)
+      || stdc_has_single_bit (0U)
+      || stdc_has_single_bit_ul (0)
+      || stdc_has_single_bit (0UL)
+      || stdc_has_single_bit_ull (0)
+      || stdc_has_single_bit (0ULL))
+    abort ();
+  if (!stdc_has_single_bit_uc (1)
+      || !stdc_has_single_bit ((unsigned char) 2)
+      || !stdc_has_single_bit_us (4)
+      || !stdc_has_single_bit ((unsigned short) 8)
+      || !stdc_has_single_bit_ui (16)
+      || !stdc_has_single_bit (32U)
+      || !stdc_has_single_bit_ul (64)
+      || !stdc_has_single_bit (128UL)
+      || !stdc_has_single_bit_ull (256)
+      || !stdc_has_single_bit (512ULL))
+    abort ();
+  if (stdc_has_single_bit_uc (3)
+      || stdc_has_single_bit ((unsigned char) 7)
+      || stdc_has_single_bit_us (31)
+      || stdc_has_single_bit ((unsigned short) 96)
+      || stdc_has_single_bit_ui (129)
+      || stdc_has_single_bit (513U)
+      || stdc_has_single_bit_ul (511)
+      || stdc_has_single_bit (1022UL)
+      || stdc_has_single_bit_ull (6)
+      || stdc_has_single_bit (12ULL))
+    abort ();
+  if (stdc_bit_width_uc (0) != 0
+      || stdc_bit_width ((unsigned char) 0) != 0
+      || stdc_bit_width_us (0) != 0
+      || stdc_bit_width ((unsigned short) 0) != 0
+      || stdc_bit_width_ui (0) != 0
+      || stdc_bit_width (0U) != 0
+      || stdc_bit_width_ul (0) != 0
+      || stdc_bit_width (0UL) != 0
+      || stdc_bit_width_ull (0) != 0
+      || stdc_bit_width (0ULL) != 0)
+    abort ();
+  if (stdc_bit_width_uc ((unsigned char) ~0U) != UCHAR_WIDTH
+      || stdc_bit_width ((unsigned char) ~0U) != UCHAR_WIDTH
+      || stdc_bit_width_us ((unsigned short) ~0U) != USHRT_WIDTH
+      || stdc_bit_width ((unsigned short) ~0U) != USHRT_WIDTH
+      || stdc_bit_width_ui (~0U) != UINT_WIDTH
+      || stdc_bit_width (~0U) != UINT_WIDTH
+      || stdc_bit_width_ul (~0UL) != ULONG_WIDTH
+      || stdc_bit_width (~0UL) != ULONG_WIDTH
+      || stdc_bit_width_ull (~0ULL) != ULLONG_WIDTH
+      || stdc_bit_width (~0ULL) != ULLONG_WIDTH)
+    abort ();
+  if (stdc_bit_width_uc ((unsigned char) ~0U >> 1) != UCHAR_WIDTH - 1
+      || stdc_bit_width ((unsigned char) 6) != 3
+      || stdc_bit_width_us ((unsigned short) 12U) != 4
+      || stdc_bit_width ((unsigned short) ((unsigned short) ~0U >> 5)) != USHRT_WIDTH - 5
+      || stdc_bit_width_ui (137U) != 8
+      || stdc_bit_width (269U) != 9
+      || stdc_bit_width_ul (39UL) != 6
+      || stdc_bit_width (~0UL >> 2) != ULONG_WIDTH - 2
+      || stdc_bit_width_ull (1023) != 10
+      || stdc_bit_width (1024ULL) != 11)
+    abort ();
+  if (stdc_bit_floor_uc (0) != 0
+      || stdc_bit_floor ((unsigned char) 0) != 0
+      || stdc_bit_floor_us (0) != 0
+      || stdc_bit_floor ((unsigned short) 0) != 0
+      || stdc_bit_floor_ui (0) != 0U
+      || stdc_bit_floor (0U) != 0U
+      || stdc_bit_floor_ul (0) != 0UL
+      || stdc_bit_floor (0UL) != 0UL
+      || stdc_bit_floor_ull (0) != 0ULL
+      || stdc_bit_floor (0ULL) != 0ULL)
+    abort ();
+  if (stdc_bit_floor_uc ((unsigned char) ~0U) != (1U << (UCHAR_WIDTH - 1))
+      || stdc_bit_floor ((unsigned char) ~0U) != (1U << (UCHAR_WIDTH - 1))
+      || stdc_bit_floor_us ((unsigned short) ~0U) != (1U << (USHRT_WIDTH - 1))
+      || stdc_bit_floor ((unsigned short) ~0U) != (1U << (USHRT_WIDTH - 1))
+      || stdc_bit_floor_ui (~0U) != (1U << (UINT_WIDTH - 1))
+      || stdc_bit_floor (~0U) != (1U << (UINT_WIDTH - 1))
+      || stdc_bit_floor_ul (~0UL) != (1UL << (ULONG_WIDTH - 1))
+      || stdc_bit_floor (~0UL) != (1UL << (ULONG_WIDTH - 1))
+      || stdc_bit_floor_ull (~0ULL) != (1ULL << (ULLONG_WIDTH - 1))
+      || stdc_bit_floor (~0ULL) != (1ULL << (ULLONG_WIDTH - 1)))
+    abort ();
+  if (stdc_bit_floor_uc ((unsigned char) 4) != 4
+      || stdc_bit_floor ((unsigned char) 7) != 4
+      || stdc_bit_floor_us ((unsigned short) 8U) != 8
+      || stdc_bit_floor ((unsigned short) 31U) != 16
+      || stdc_bit_floor_ui (137U) != 128U
+      || stdc_bit_floor (269U) != 256U
+      || stdc_bit_floor_ul (511UL) != 256UL
+      || stdc_bit_floor (512UL) != 512UL
+      || stdc_bit_floor_ull (513) != 512ULL
+      || stdc_bit_floor (1024ULL) != 1024ULL)
+    abort ();
+  if (stdc_bit_ceil_uc (0) != 1
+      || stdc_bit_ceil ((unsigned char) 0) != 1
+      || stdc_bit_ceil_us (0) != 1
+      || stdc_bit_ceil ((unsigned short) 0) != 1
+      || stdc_bit_ceil_ui (0) != 1U
+      || stdc_bit_ceil (0U) != 1U
+      || stdc_bit_ceil_ul (0) != 1UL
+      || stdc_bit_ceil (0UL) != 1UL
+      || stdc_bit_ceil_ull (0) != 1ULL
+      || stdc_bit_ceil (0ULL) != 1ULL)
+    abort ();
+  if (stdc_bit_ceil_uc ((unsigned char) ~0U >> 1) != (1U << (UCHAR_WIDTH - 1))
+      || stdc_bit_ceil ((unsigned char) ((unsigned char) ~0U >> 1)) != (1U << (UCHAR_WIDTH - 1))
+      || stdc_bit_ceil_us ((unsigned short) ~0U >> 1) != (1U << (USHRT_WIDTH - 1))
+      || stdc_bit_ceil ((unsigned short) ((unsigned short) ~0U >> 1)) != (1U << (USHRT_WIDTH - 1))
+      || stdc_bit_ceil_ui (~0U >> 1) != (1U << (UINT_WIDTH - 1))
+      || stdc_bit_ceil (1U << (UINT_WIDTH - 1)) != (1U << (UINT_WIDTH - 1))
+      || stdc_bit_ceil_ul (~0UL >> 1) != (1UL << (ULONG_WIDTH - 1))
+      || stdc_bit_ceil (~0UL >> 1) != (1UL << (ULONG_WIDTH - 1))
+      || stdc_bit_ceil_ull (1ULL << (ULLONG_WIDTH - 1)) != (1ULL << (ULLONG_WIDTH - 1))
+      || stdc_bit_ceil (~0ULL >> 1) != (1ULL << (ULLONG_WIDTH - 1)))
+    abort ();
+  if (stdc_bit_ceil_uc ((unsigned char) 1) != 1
+      || stdc_bit_ceil ((unsigned char) 2) != 2
+      || stdc_bit_ceil_us ((unsigned short) 3U) != 4
+      || stdc_bit_ceil ((unsigned short) 4U) != 4
+      || stdc_bit_ceil_ui (5U) != 8U
+      || stdc_bit_ceil (269U) != 512U
+      || stdc_bit_ceil_ul (511UL) != 512UL
+      || stdc_bit_ceil (512UL) != 512UL
+      || stdc_bit_ceil_ull (513) != 1024ULL
+      || stdc_bit_ceil (1025ULL) != 2048ULL)
+    abort ();
+}