summaryrefslogtreecommitdiff
path: root/libc/test/src/stdbit
AgeCommit message (Collapse)Author
2025-03-08[libc] `first_trailing_one(0)` should be `0`. (#130155)Connector Switch
Fix this minor bug. See more context at #129892.
2025-02-11[libc][test][stdbit] fix -Wimplicit-int-conversion (#126616)Nick Desaulniers
When cross compiling the libc-stdbit-tests, the existing tests trigger numerous instances of -Wimplicit-int-conversion. The truncation of these implicit promotions is intentional.
2024-08-09[libc] Fix use of cpp::numeric_limits<...>::digits (#102674)Roland McGrath
The previous change replaced INT_WIDTH with cpp::numberic_limits<int>::digits, but these don't have the same value. While INT_WIDTH == UINT_WIDTH, not so for ::digits, so use cpp::numberic_limits<unsigned int>::digits et al instead for the intended effects. Bug: https://issues.fuchsia.dev/358196552
2024-08-09[libc] Use cpp::numeric_limits in preference to C23 <limits.h> macros (#102665)Roland McGrath
This updates some code to consistently use cpp::numeric_limits, the src/__support polyfill for std::numeric_limits, rather than the C <limits.h> macros. This is in keeping with the general C++-oriented style in libc code, and also sidesteps issues about the new C23 *_WIDTH macros that the compiler-provided header does not define outside C23 mode. Bug: https://issues.fuchsia.dev/358196552
2024-03-10[libc][stdbit][c23] adds implementation of `stdc_bit_ceil` functions (#84657)Michael Flanders
Closes #84652. Based on #84233.
2024-03-07[libc][stdbit] implement stdc_bit_floor (C23) (#84233)Nick Desaulniers
2024-03-05[libc][stdbit] implement stdc_bit_width (C23) (#83892)Nick Desaulniers
2024-03-04[libc][test][stdbit] fix has_single_bit test names (#83904)Nick Desaulniers
This was copy+pasted from count_ones without updating the test name completely.
2024-02-27[libc][stdbit] implement stdc_has_single_bit (C23) (#83168)Nick Desaulniers
2024-02-26[libc][stdbit] implement stdc_count_ones (C23) (#82444)Nick Desaulniers
2024-02-26[libc][stdbit] implement stdc_count_zeros (C23) (#82437)Nick Desaulniers
2024-02-14[libc][stdbit] implement stdc_first_trailing_one (C23) (#81768)Nick Desaulniers
2024-02-14[libc][stdbit] implement stdc_first_trailing_zero (C23) (#81526)Nick Desaulniers
2024-02-14[libc][stdbit] implement stdc_first_leading_one (C23) (#81502)Nick Desaulniers
2024-02-12[libc][stdbit] implement stdc_first_leading_zero (C23) (#81340)Nick Desaulniers
2024-02-07[libc][stdbit] implement stdc_trailing_ones (C23) (#80459)Nick Desaulniers
2024-02-06[libc][stdbit] implement stdc_trailing_zeros (C23) (#80344)Nick Desaulniers
2024-02-01[libc][stdbit] fix return types (#80337)Nick Desaulniers
All of the functions I've previously implemented return an unsigned int; not the parameter type.
2024-02-01[libc] implement stdc_leading_ones (C23) (#80082)Nick Desaulniers
2024-01-29[libc] implement stdc_leading_zeros_u* for stdbit.h (#79669)Nick Desaulniers
- stdbit.stdc_leading_zeros_uc - stdbit.stdc_leading_zeros_us - stdbit.stdc_leading_zeros_ui - stdbit.stdc_leading_zeros_ul - stdbit.stdc_leading_zeros_ull Test via: $ ninja libc-stdbit-tests libc_include_tests