aboutsummaryrefslogtreecommitdiff
path: root/libc/docs
AgeCommit message (Collapse)AuthorFilesLines
2024-06-20[libc][math][c23] Add {getpayload,setpayload,setpayloadsig}f16 C23 math ↵OverMighty2-2/+9
functions (#95159) Part of #93566.
2024-06-14[libc] add rwlock (#94156)Schrodinger ZHU Yifan1-0/+1
2024-06-14[libc][math][c23] Add f16fmaf C23 math function (#95483)OverMighty1-0/+2
Part of #93566.
2024-06-13[libc][math][c23] Add f16sqrtf C23 math function (#95251)OverMighty1-0/+2
Part of #95250.
2024-06-11[libc][math][c23] Add {totalorder,totalordermag}f16 C23 math functions (#95014)OverMighty2-2/+6
Part of #93566.
2024-06-10[libc][math][c23] Add {remainder,remquo}f16 C23 math functions (#94773)OverMighty1-2/+2
Part of #93566.
2024-06-10[libc][math][c23] Add {frexp,ilogb,llogb,logb,modf}f16 C23 math functions ↵OverMighty2-6/+6
(#94758) Part of #93566.
2024-06-10[libc][math][c23] Add nanf16 C23 math function (#94767)OverMighty1-1/+1
Part of #93566.
2024-06-08[libc][math][C23] Implemented remquof128 function (#94809)Hendrik Hübner1-1/+1
Added remquof128 function. Closes #94312
2024-06-08[libc][math][c23] fmul correcly rounded to all rounding modes (#91537)Job Henandez Lara1-1/+1
This is an implementation of floating point multiplication: It will consist of - `double x double -> float`
2024-06-07[libc][math][c23] Add fmodf16 C23 math function (#94629)OverMighty1-1/+1
Part of #93566.
2024-06-06[libc][math][c23] Add {fmaximum,fminimum}{,_mag,_mag_num,_num} C23 math ↵OverMighty2-14/+16
functions (#94510) #93566
2024-06-05[libc][math][c23] Add {nextafter,nexttoward,nextup,nextdown}f16 C23 math ↵OverMighty2-6/+6
functions (#94535) #93566
2024-06-05[libc][math][c23] Implement fmaxf16 and fminf16 function (#94131)Hendrik Hübner1-2/+2
Implements fmaxf16 and fminf16, which are two missing functions listed here: #93566
2024-06-05[libc][math][c23] Add fdimf16 C23 math function (#94354)OverMighty1-1/+1
#93566
2024-06-05[libc][math][c23] Add copysignf16 C23 math function (#94351)OverMighty1-1/+1
#93566
2024-06-05[libc][math][c23] Add canonicalizef16 C23 math function (#94341)OverMighty2-2/+2
#93566
2024-06-04[NFC] Fix typo in libc/docs/gpu/using.rstJoachim Meyer1-1/+1
2024-06-04[libc][math][c23] Add {fromfp,fromfpx,ufromfp,ufromfpx}f16 C23 math ↵OverMighty2-7/+8
functions (#94254) https://github.com/llvm/llvm-project/issues/93566
2024-06-04[libc][math][c23] Add {nearbyint,rint,lrint,llrint,lround,llround}f16 C23 ↵OverMighty1-6/+6
math functions (#94218) https://github.com/llvm/llvm-project/issues/93566
2024-06-03[libc][math][c23] Add {ceil,floor,round,roundeven,trunc}f16 C23 math ↵OverMighty1-5/+5
functions (#94001)
2024-05-31[libc] rework mutex (#92168)Schrodinger ZHU Yifan1-0/+3
2024-05-30[libc][math][c23] Add fabsf16 C23 math function (#93567)OverMighty1-1/+1
cc @lntue
2024-05-23[libc][docs] adds macro handling, POSIX status, and validation to docgen ↵Michael Flanders5-15/+520
(#89421) docgen now lists macro implementation status in the generated rst files. Adds POSIX definition link property to docgen json API (`posix-definition`) and changes the `defined` property of docgen json API to `c-definition`. Now that docgen's api is getting more specified, adds validation checks to docgen to start codifying the docgen api spec. To make sure this all looks good, I've added POSIX definition links to signal.h as a tester.
2024-04-30Add basic char*_t support for libc (partial WG14 N2653) (#90360)Fabian Keßler1-1/+1
This PR implements a part of WG14 N2653: - Define C23 char8_t - Define C11 char16_t - Define C11 char32_t Missing goals are: - The type of UTF-8 character literals is changed from unsigned char to char8_t. (Since UTF-8 character literals already have type unsigned char, this is not a semantic change). - New mbrtoc8() and c8rtomb() functions declared in <uchar.h> enable conversions between multibyte characters and UTF-8. - A new ATOMIC_CHAR8_T_LOCK_FREE macro. - A new atomic_char8_t typedef name.
2024-04-29[libc][math] Adds entrypoint and tests for nearbyintf128,scalbnf128 (#88443)Michael Flanders1-2/+2
Closes #84689. Adding @lntue for review. I was curious about the implementation of `round_using_current_rounding_mode` used for the `nearbyint` functions. It has one of the rounding modes as unreachable ([here](https://github.com/llvm/llvm-project/blob/main/libc/src/__support/FPUtil/NearestIntegerOperations.h#L243)), and I was wondering if this was okay for the `nearbyint` functions. --------- Co-authored-by: Michael Flanders <mkf727@cs.washington.edu>
2024-04-23[libc] Generate docs for `setjmp.h` (#89542)Rajveer Singh Bharadwaj2-0/+17
Resolves #88065 Added macros and functions.
2024-04-22[libc][docs] codify Policy on Assembler Sources (#88185)Nick Desaulniers1-0/+41
It would be helpful in future code reviews to document a policy with regards to where and when Assembler sources are appropriate. That way when reviewers point out infractions, they can point to this written policy, which may help contributors understand that it's not solely the personal preferences of individual reviewers but instead rather a previously agreed upon rule by maintainers. Link: https://github.com/llvm/llvm-project/pull/87837 Link: https://github.com/llvm/llvm-project/pull/88157 Link: https://discourse.llvm.org/t/hand-written-in-assembly-in-libc-setjmp-longjmp/73249/12
2024-04-18[libc][docs] link to good beginner bugs (#89297)Nick Desaulniers1-0/+8
Tagging bugs as "good first issue" and taking the time to work with new contributors pays dividends.
2024-04-18[libc][docs] adds threads.h impl status docs (#89275)Michael Flanders2-0/+89
Closes #88067. Adding @nickdesaulniers for review.
2024-04-18[libc][docs] adds highlighting languages to `docs/dev/config_options.rst` ↵Michael Flanders1-9/+7
(#89136) Fixes #89135.
2024-04-17[libc][c23][fenv] Implement fetestexceptflag (#87828)Robin Caloudis2-3/+3
Provide C23 `fetestexceptflag` function according to 7.6.4.6 in the latest [revision of the C standard](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf) from 2023-04-02. Closes https://github.com/llvm/llvm-project/issues/87565.
2024-04-12[libc][docs] use docgen to generate stdbit rst docs (#88540)Michael Flanders1-131/+219
Closes #88066. Compared to before, the function names in the stdbit table are sorted by function name, not order-of-appearance in the standard. Since macros aren't printed by docgen.py and are still a TODO in the code, they are also not printed in the new stdbit.h docs. Adds some checks to docgen.py for conditions that tripped me up. Add code to docgen.py to add the include of the `|check|` rewriter, since all other generated files need it.
2024-04-11[libc] Codify header inclusion policy (#87017)Nick Desaulniers2-1/+38
When supporting "overlay" vs "fullbuild" modes, "what ABI are you using?" becomes a fundamental question to have concrete answers for. Overlay mode MUST match the ABI of the system being overlayed onto; fullbuild more flexible (the only system ABI relevant is the OS kernel). When implementing llvm-libc we generally prefer the include-what-you use style of avoiding transitive dependencies (since that makes refactoring headers more painful, and slows down build times). So what header do you include for any given type or function declaration? For any given userspace program, the answer is straightforward. But for llvm-libc which is trying to support multiple ABIs (at least one per configuration), the answer is perhaps less clear. This proposal seeks to add one layer of indirection relative to what's being done today. It then converts users of sigset_t and struct epoll_event and the epoll implemenations over to this convention as an example.
2024-04-11[libc][docs] Generate docs for signal.h & optimized is_implemented func (#88028)Xu Zhang2-0/+44
Fixes #87835 This patch added the documentation for the POSIX functions according to [n3096](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf) Section 7.14, and gives the *docgen.py* script a more elegant *is_implemented* function.
2024-04-10[libc] Add note to use `LIBC_GPU_BUILD=ON` as another formJoseph Huber1-1/+6
Summary: This is a shorthand to enable GPU support so it should be listed in the docs.
2024-04-08[libc][docs] fix missing includeNick Desaulniers1-0/+2
Fixes #87946
2024-04-08[libc][docs] generate docs for ctype.h (#87946)Zander Dumont-Strom2-0/+54
Fixes #87833
2024-04-05[libc][docs] Introduce docgen (#87682)Nick Desaulniers2-0/+65
This script+config should help us generate more consistent documentation wrt. what we currently support or not. As an example usage: $ ./libc/utils/docgen/docgen.py fenv.h Will spit out an RST formatted table that can be copy+pasted into our docs. The config is not filled out entirely, but doing so and then updating our docs would be great beginner bugs for new contributors. Having python+json generate things like docs, or headers (as imagined in https://github.com/nickdesaulniers/llvm-project/tree/hdr-gen2) is perhaps easier to work with than tablegen, and doesn't introduce a dependency on a host tool that needs to be compiled from llvm sources before building the rest of the libc. This can probably be merged with whatever we end up doing to replace libc-hdrgen. Please use https://llvm.org/docs/CodingStandards.html#python-version-and-source-code-formatting for keeping this file formatted.
2024-04-05 [libc][c23][fenv] implement fesetexcept (#87603)aniplcc1-1/+1
Closes #87564
2024-04-05[libc] Implement roundeven C23 math functions (#87678)Vinayak Dev2-2/+2
Implements the functions `roundeven()`, `roundevenf()`, `roundevenl()` from the roundeven family of functions introduced in C23. Also implements `roundevenf128()`.
2024-04-04[libc][math][c23] Add exp2m1f C23 math function (#86996)OverMighty1-1/+1
Fixes #86502. cc @lntue
2024-04-02[libc] Move {f,d}sqrt to higher functions in docs (#87445)Vinayak Dev1-4/+4
Moves the functions `fsqrt()` and `dsqrt()` from basic functions to higher math functions in math docs
2024-04-02[libc] Re-organize the math function tables in docs (#87412)Vinayak Dev1-509/+219
Re-organizes the tables that listed libc's support for math functions, and adds two new columns to the tables indicating where the respective function definitions and error handling methods are located in the C23 standard draft WG14-N3096.
2024-04-01[libc][math] Implement atan2f correctly rounded to all rounding modes. (#86716)lntue1-1/+2
We compute atan2f(y, x) in 2 stages: - Fast step: perform computations in double precision , with relative errors < 2^-50 - Accurate step: if the result from the Fast step fails Ziv's rounding test, then we perform computations in double-double precision, with relative errors < 2^-100. On Ryzen 5900X, worst-case latency is ~ 200 clocks, compared to average latency ~ 60 clocks, and average reciprocal throughput ~ 20 clocks.
2024-03-29[libc] enable stack protectors and frame pointers on default (#86288)Schrodinger ZHU Yifan1-0/+3
2024-03-29[libc][Docs] Update RPC server example using CUDA after changesJoseph Huber1-11/+4
Summary: This has changed, so update it to match the new interface.
2024-03-29Add bit width length modifier to printf (#82461)Om Prakaash1-0/+4
Resolves #81685. This adds support for wN and wfN length modifiers in fprintf.
2024-03-27Revert "[libc][math][c23] Add remaining linux/* entrypoints for ↵Nick Desaulniers1-16/+16
{,u}fromfp{,x}* (#86692)" This reverts commit cd17082b24079a31eff0057abe407da5cfb7b0fc because the newly added tests fail on 32b ARM. Link: #86692 Link: https://lab.llvm.org/buildbot/#/builders/229/builds/24458
2024-03-27[libc][math][c23] Add remaining linux/* entrypoints for {,u}fromfp{,x}* (#86692)OverMighty1-16/+16