Rémi Denis-Courmont
465c24b1b5
Revert "stdbit: copy-paste error, fix first_leading_zero"
This reverts commit a025e757c90ea892648ada77c641e3ee702bba11.
2 years ago
Rémi Denis-Courmont
47339a90e2
stdbit: copy-paste error, fix first_leading_zero
2 years ago
Rémi Denis-Courmont
13d399232a
stdbit: fix typo
Evidently (and unsurprisingly) nobody compiles our code with anything
other than GCC or LLVM.
2 years ago
Rémi Denis-Courmont
dbc3f839d8
stdbit: fix CTZ fall-back
The computed value was incorrect for types smaller than long long. The
code is not really used by anything at the moment, since we pretty much
compile with Clang or GCC only.
2 years ago
Rémi Denis-Courmont
7a970a3332
stdbit: fix std_bit_width*()
3 years ago
Rémi Denis-Courmont
623ee542ad
stdbit: factor stdc_count_zeros*()
No functional changes.
3 years ago
Rémi Denis-Courmont
1931ecd606
stdbit: factor stdc_first_trailing_zero*()
No functional changes.
3 years ago
Rémi Denis-Courmont
585c4f854c
stdbit: fix stdc_first_leading_*()
3 years ago
Rémi Denis-Courmont
a1245addb0
stdbit: use GCC / Clang built-ins where applicable
3 years ago
Rémi Denis-Courmont
a7707435a6
compat: add fallback for C23 <stdbit.h>
3 years ago