about summary refs log tree commit diff
path: root/library/compiler-builtins/libm-test
AgeCommit message (Collapse)AuthorLines
2025-07-27Implement `floor` and `ceil` in assembly on `i586`Folkert de Vries-22/+0
Fixes: https://github.com/rust-lang/compiler-builtins/issues/837 The assembly is based on - https://github.com/NetBSD/src/blob/20433927938987dd64c8f6aa46904b7aca3fa39e/lib/libm/arch/i387/s_floor.S - https://github.com/NetBSD/src/blob/20433927938987dd64c8f6aa46904b7aca3fa39e/lib/libm/arch/i387/s_ceil.S Which both state /* * Written by J.T. Conklin <jtc@NetBSD.org>. * Public domain. */ Which I believe means we're good in terms of licensing.
2025-07-10Upgrade `iai-callgrind` to 0.15Trevor Gross-1/+1
Pick up the latest version of iai-callgrind, which includes some output improvements. Changelog: https://github.com/iai-callgrind/iai-callgrind/releases
2025-07-10Upgrade dependencies to the latest versionTrevor Gross-1/+1
This picks up a fix in `rustc_apfloat` [1] that resolves a problem with `fma`. [1]: https://github.com/rust-lang/rustc_apfloat/releases/tag/rustc_apfloat-v0.2.3%2Bllvm-462a31f5a5ab
2025-07-01libm: Improved integer utilities, implement shifts and bug fixes for i256 ↵quaternic-3/+61
and u256 `i256` and `u256` - operators now use the same overflow convention as primitives - implement `<<` and `-` (previously just `>>` and `+`) - implement `Ord` correctly (the previous `PartialOrd` was broken) - correct `i256::SIGNED` to `true` The `Int`-trait is extended with `trailing_zeros`, `carrying_add`, and `borrowing_sub`.
2025-06-29apply suggestions for clippy::manual_is_multiple_of in libm-testquaternic-3/+3
2025-06-04Replace the musl submodule with a download scriptTrevor Gross-1/+1
The submodule was causing issues in rust-lang/rust, so eliminiate it here. `build-musl` is also removed from `libm-test`'s default features so the crate doesn't need to be built by default.
2025-06-02libm-test: Fix unintentional skips in `binop_common`Trevor Gross-11/+25
`binop_common` emits a `SKIP` that is intended to apply only to `copysign`, but is instead applying to all binary operators. Correct the general case but leave the currently-failing `maximum_num` tests as a FIXME, to be resolved separately in [1]. Also simplify skip logic and NaN checking, and add a few more `copysign` checks. [1]: https://github.com/rust-lang/compiler-builtins/pull/939
2025-06-02cleanup: Use `x.biteq(y)` rather than `x.to_bits() == y.to_bits()`Trevor Gross-5/+2
2025-06-01Upgrade all dependencies to the latest available versionTrevor Gross-7/+7
In particular, this includes a fix to `iai-callgrind` that will allow us to simplify our benchmark runner.
2025-05-29libm-test: Make `extensive` an attribute rather than a test typeTrevor Gross-25/+60
Currently we run logspace tests for extensive tests, but there isn't any reason we couldn't also run more kinds of tests more extensively (e.g. more edge cases, combine edge cases with logspace for multi-input functions, etc). As a first step toward making this possible, make `extensive` a new field in `CheckCtx`, and rename `QuickSpaced` to `Spaced`.
2025-05-29Add benchmarks for float parsing and printingTrevor Gross-17/+83
As part of this, the u256 benchmarks are reorganized to a group.
2025-05-01fmaf: Add a test case from a MinGW failureTrevor Gross-1/+12
This is a known problem in the MinGW fmaf implementation, identified at [1]. Make sure our implementation passes this edge case. [1]: https://github.com/rust-lang/rust/issues/140515
2025-04-23libm-macros: Allow a way to bulk match f16 and f128 functionsTrevor Gross-81/+7
These are never available in musl, so introduce easier ways to skip them rather than needing to exclude f16/f128 functions in three different places.
2025-04-23libm-macros: Start tracking which functions are publicTrevor Gross-3/+7
It would be nice to reuse some of the macro structure for internal functions, like `rem_pio2`. To facilitate this, add a `public` field and make it available in the macro's API.
2025-04-21Update licensing information after repository refactoringTrevor Gross-0/+1
In order to disambiguate things now that libm is part of the compiler-builtins repository, do the following: * Mention libm in LICENSE.txt * Clarify the default license for crates other than libm and compiler-builtins * Add an explicit license field to Cargo.toml for all other crates
2025-04-20ci: Enable testing of `libm` cratesTrevor Gross-0/+3
Update `run.sh` to start testing `libm`. Currently this is somewhat inefficient because `builtins-test` gets run more than once on some targets; this can be cleaned up later.
2025-04-20Fix the libm-test logfile pathTrevor Gross-6/+1
This was broken since the crate's location relative to the target directory had changed.
2025-04-19Add remaining `libm` crates to the workspaceTrevor Gross-2/+2
These are still not yet covered in CI since we always name explicit packages there, but all crates are now part of the workspace.
2025-04-19Run `cargo fmt` on all projectsTrevor Gross-79/+281
Apply the same formatting rules to both `libm` and `compiler-builtins`.
2025-04-19libm: Fix crate compilationTrevor Gross-7/+7
Update paths and submodules to fix `libm-test` and `util` building so we will be able to add them to the workspace.
2025-04-19libm: Reorganize into compiler-builtinsTrevor Gross-0/+6721
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`.