about summary refs log tree commit diff
path: root/library/compiler-builtins/libm-test/src
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-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-05-29libm-test: Make `extensive` an attribute rather than a test typeTrevor Gross-19/+55
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-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: 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-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-19Run `cargo fmt` on all projectsTrevor Gross-68/+233
Apply the same formatting rules to both `libm` and `compiler-builtins`.
2025-04-19libm: Fix crate compilationTrevor Gross-2/+2
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/+5130
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`.