about summary refs log tree commit diff
path: root/library/compiler-builtins/builtins-test/benches/float_cmp.rs
AgeCommit message (Collapse)AuthorLines
2025-07-02Use the compiler to determine whether or not to enable `f16` and `f128`Trevor Gross-0/+2
Currently we whether or not to build and test `f16` and `f128` support mostly based on the target triple. This isn't always accurate, however, since support also varies by backend and the backend version. Since recently, `rustc` is aware of this with the unstable config option `target_has_reliable_{f16,f128}`, which better represents when the types are actually expected to be available and usable. Switch our compiler-builtins and libm configuration to use this by probing `rustc` for the target's settings. A few small `cfg` fixes are needed with this.
2025-05-28Update `CmpResult` to use a pointer-sized return typeTrevor Gross-16/+27
As seen at [1], LLVM uses `long long` on LLP64 (to get a 64-bit integer matching pointer size) and `long` on everything else, with exceptions for AArch64 and AVR. Our current logic always uses an `i32`. This happens to work because LLVM uses 32-bit instructions to check the output on x86-64, but the GCC checks the full 64-bit register so garbage in the upper half leads to incorrect results. Update our return type to be `isize`, with exceptions for AArch64 and AVR. Fixes: https://github.com/rust-lang/compiler-builtins/issues/919 [1]: https://github.com/llvm/llvm-project/blob/0cf3c437c18ed27d9663d87804a9a15ff6874af2/compiler-rt/lib/builtins/fp_compare_impl.inc#L11-L27
2025-04-19Run `cargo fmt` on all projectsTrevor Gross-2/+1
Apply the same formatting rules to both `libm` and `compiler-builtins`.
2025-04-18Rename `testcrate` to `builtins-test`Trevor Gross-0/+208
The repo will soon have `libm` as a top-level crate, so make it clear that this is only the test crate for `compiler-builtins`.