about summary refs log tree commit diff
path: root/library/compiler-builtins/etc/function-definitions.json
AgeCommit message (Collapse)AuthorLines
2025-05-03Use runtime feature detection for fma routines on x86Trevor Gross-0/+2
Get performance closer to the glibc implementations by adding assembly fma routines, with runtime feature detection so they are used even if not compiled with `+fma` (as the distributed standard library is often not). Glibc uses ifuncs, this implementation stores a function pointer in an atomic. Results of CPU flags are also cached in order to avoid repeating the startup time in calls to different functions. The feature detection code is a slightly simplified version of `std-detect`. Musl sources were used as a reference [1]. Fixes: https://github.com/rust-lang/rust/issues/140452 once synced [1]: https://github.com/bminor/musl/blob/c47ad25ea3b484e10326f933e927c0bc8cded3da/src/math/x32/fma.c
2025-05-03Rename the i686 module to x86Trevor Gross-2/+2
This module is used for both i686 and x86-64.
2025-04-29Refactor the fma modulesTrevor Gross-1/+1
Move implementations to `generic/` like the other functions. This also allows us to combine the `fma` and `fma_wide` modules.
2025-04-19libm: Reorganize into compiler-builtinsTrevor Gross-0/+1069
Distribute everything from `libm/` to better locations in the repo. `libm/libm/*` has not moved yet to avoid Git seeing the move as an edit to `Cargo.toml`. Files that remain to be merged somehow are in `etc/libm`.