16 Commits

Author SHA1 Message Date
Nick Desaulniers
93e423f19f
[libc][test] update constants used in stdbit test (#83893)
Either:
- I forgot my alphabet (that E comes before F).
- My juvenile inner brain finds unsigned literal constants with the sequence FU
  funny.

¿Por qué no los dos?
2024-03-04 12:35:57 -08:00
lntue
73aab2f697
[libc] Revert https://github.com/llvm/llvm-project/pull/83199 since it broke Fuchsia. (#83374)
With some header fix forward for GPU builds.
2024-02-29 14:43:53 -05:00
Joseph Huber
04e8653f18
[libc] Add "include/" to the LLVM include directories (#83199)
Summary:
Recent changes added an include path in the float128 type that used the
internal `libc` path to find the macro. This doesn't work once it's
installed because we need to search from the root of the install dir.
This patch adds "include/" to the include path so that our inclusion
of installed headers always match the internal use.
2024-02-27 17:45:15 -06:00
Nick Desaulniers
06bcd9da16
[libc][stdbit] implement stdc_has_single_bit (C23) (#83168) 2024-02-27 13:45:37 -08:00
Nick Desaulniers
d8406d48a8
[libc][stdbit] implement stdc_count_ones (C23) (#82444) 2024-02-26 09:25:24 -08:00
Nick Desaulniers
f70d5c0bc8
[libc][stdbit] implement stdc_count_zeros (C23) (#82437) 2024-02-26 09:23:15 -08:00
Nick Desaulniers
6297479ff0
[libc][stdbit] implement stdc_first_trailing_one (C23) (#81768) 2024-02-14 11:10:48 -08:00
Nick Desaulniers
16e7d6842e
[libc][stdbit] implement stdc_first_trailing_zero (C23) (#81526) 2024-02-14 10:34:28 -08:00
Nick Desaulniers
60596716c2
[libc][stdbit] implement stdc_first_leading_one (C23) (#81502) 2024-02-14 09:16:00 -08:00
Nick Desaulniers
d2d6b368a1
[libc][stdbit] implement stdc_first_leading_zero (C23) (#81340) 2024-02-12 08:31:53 -08:00
Nick Desaulniers
7760006d8d
[libc][stdbit] implement stdc_trailing_ones (C23) (#80459) 2024-02-07 02:56:24 -08:00
Nick Desaulniers
d5a3de4aee
[libc][stdbit] implement stdc_trailing_zeros (C23) (#80344) 2024-02-06 06:27:03 -08:00
Nick Desaulniers
edbd93d370
[libc][stdbit] fix return types (#80337)
All of the functions I've previously implemented return an unsigned int; not
the parameter type.
2024-02-01 13:09:33 -08:00
Nick Desaulniers
f883365cc7
[libc] fix stdbit include test when not all entrypoints are available (#80323)
The intent of the test is to check that: 1. The type generic macros are
defined. 2. Those macros dispatch to the correct underlying function.

The issue is that when new functionality is added to our stdbit.h without
rolling out the new entrypoint to all targets, this test breaks because our
generated stdbit.h will not contain declarations for the underlying function.
In that case, we should just declare the underlying functions first before
including our generated stdbit.h which just contains declarations. A definition
is a declaration, but redeclarations must match, hence the additions of
noexcept and extern "C".
2024-02-01 12:08:00 -08:00
Nick Desaulniers
6a3fde6d60
[libc] implement stdc_leading_ones (C23) (#80082) 2024-02-01 10:14:22 -08:00
Nick Desaulniers
7bc5eaa02f
[libc] implement stdc_leading_zeros_u* for stdbit.h (#79669)
- 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
2024-01-29 15:47:55 -08:00