| { | ||
| "git": { | ||
| "sha1": "257dd4808950ec85ed9ecffb8116c550079684f7" | ||
| "sha1": "a4c748f72a1dce652cc3e41c3a8425731bd1519a" | ||
| }, | ||
| "path_in_vcs": "libm" | ||
| } |
+1
-1
@@ -7,3 +7,3 @@ # This file is automatically @generated by Cargo. | ||
| name = "libm" | ||
| version = "0.2.14" | ||
| version = "0.2.15" | ||
| dependencies = [ | ||
@@ -10,0 +10,0 @@ "no-panic", |
+1
-1
@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "libm" | ||
| version = "0.2.14" | ||
| version = "0.2.15" | ||
| authors = ["Jorge Aparicio <jorge@japaric.io>"] | ||
@@ -19,0 +19,0 @@ build = "build.rs" |
+6
-0
@@ -11,2 +11,8 @@ # Changelog | ||
| ## [0.2.15](https://github.com/rust-lang/compiler-builtins/compare/libm-v0.2.14...libm-v0.2.15) - 2025-05-06 | ||
| ### Other | ||
| - Require `target_has_atomic = "ptr"` for runtime feature detection | ||
| ## [0.2.14](https://github.com/rust-lang/compiler-builtins/compare/libm-v0.2.13...libm-v0.2.14) - 2025-05-03 | ||
@@ -13,0 +19,0 @@ |
@@ -0,1 +1,4 @@ | ||
| // Using runtime feature detection requires atomics. Currently there are no x86 targets | ||
| // that support sse but not `AtomicPtr`. | ||
| #[cfg(target_arch = "x86")] | ||
@@ -6,7 +9,7 @@ use core::arch::x86::{__cpuid, __cpuid_count, _xgetbv, CpuidResult}; | ||
| use crate::support::{Flags, get_or_init_flags_cache}; | ||
| use crate::support::feature_detect::{Flags, get_or_init_flags_cache, unique_masks}; | ||
| /// CPU features that get cached (doesn't correlate to anything on the CPU). | ||
| pub mod cpu_flags { | ||
| use crate::support::unique_masks; | ||
| use super::unique_masks; | ||
@@ -13,0 +16,0 @@ unique_masks! { |
@@ -7,3 +7,4 @@ //! Use assembly fma if the `fma` or `fma4` feature is detected at runtime. | ||
| use super::detect::{cpu_flags, get_cpu_features}; | ||
| use crate::support::{Round, select_once}; | ||
| use crate::support::Round; | ||
| use crate::support::feature_detect::select_once; | ||
@@ -10,0 +11,0 @@ pub fn fma(x: f64, y: f64, z: f64) -> f64 { |
@@ -10,4 +10,3 @@ /* SPDX-License-Identifier: MIT */ | ||
| use super::super::support::{FpResult, Status}; | ||
| use super::super::{Float, Int, IntTy, MinInt}; | ||
| use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status}; | ||
@@ -14,0 +13,0 @@ #[inline] |
@@ -1,2 +0,2 @@ | ||
| use super::super::Float; | ||
| use crate::support::Float; | ||
@@ -3,0 +3,0 @@ /// Copy the sign of `y` to `x`. |
@@ -1,2 +0,2 @@ | ||
| use super::super::Float; | ||
| use crate::support::Float; | ||
@@ -3,0 +3,0 @@ /// Absolute value. |
@@ -1,2 +0,2 @@ | ||
| use super::super::Float; | ||
| use crate::support::Float; | ||
@@ -3,0 +3,0 @@ #[inline] |
@@ -10,4 +10,3 @@ /* SPDX-License-Identifier: MIT | ||
| use super::super::support::{FpResult, Status}; | ||
| use super::super::{Float, Int, IntTy, MinInt}; | ||
| use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status}; | ||
@@ -14,0 +13,0 @@ #[inline] |
@@ -17,3 +17,3 @@ /* SPDX-License-Identifier: MIT OR Apache-2.0 */ | ||
| use super::super::Float; | ||
| use crate::support::Float; | ||
@@ -20,0 +20,0 @@ #[inline] |
@@ -14,3 +14,3 @@ /* SPDX-License-Identifier: MIT OR Apache-2.0 */ | ||
| use super::super::Float; | ||
| use crate::support::Float; | ||
@@ -17,0 +17,0 @@ #[inline] |
@@ -12,3 +12,3 @@ /* SPDX-License-Identifier: MIT OR Apache-2.0 */ | ||
| use super::super::Float; | ||
| use crate::support::Float; | ||
@@ -15,0 +15,0 @@ #[inline] |
@@ -17,3 +17,3 @@ /* SPDX-License-Identifier: MIT OR Apache-2.0 */ | ||
| use super::super::Float; | ||
| use crate::support::Float; | ||
@@ -20,0 +20,0 @@ #[inline] |
@@ -14,3 +14,3 @@ /* SPDX-License-Identifier: MIT OR Apache-2.0 */ | ||
| use super::super::Float; | ||
| use crate::support::Float; | ||
@@ -17,0 +17,0 @@ #[inline] |
@@ -12,3 +12,3 @@ /* SPDX-License-Identifier: MIT OR Apache-2.0 */ | ||
| use super::super::Float; | ||
| use crate::support::Float; | ||
@@ -15,0 +15,0 @@ #[inline] |
| /* SPDX-License-Identifier: MIT OR Apache-2.0 */ | ||
| use super::super::{CastFrom, Float, Int, MinInt}; | ||
| use crate::support::{CastFrom, Float, Int, MinInt}; | ||
@@ -4,0 +4,0 @@ #[inline] |
| /* SPDX-License-Identifier: MIT */ | ||
| /* origin: musl src/math/rint.c */ | ||
| use super::super::Float; | ||
| use super::super::support::{FpResult, Round}; | ||
| use crate::support::{Float, FpResult, Round}; | ||
@@ -7,0 +6,0 @@ /// IEEE 754-2019 `roundToIntegralExact`, which respects rounding mode and raises inexact if |
@@ -1,3 +0,3 @@ | ||
| use super::super::{Float, MinInt}; | ||
| use super::{copysign, trunc}; | ||
| use crate::support::{Float, MinInt}; | ||
@@ -4,0 +4,0 @@ #[inline] |
@@ -1,2 +0,2 @@ | ||
| use super::super::{CastFrom, CastInto, Float, IntTy, MinInt}; | ||
| use crate::support::{CastFrom, CastInto, Float, IntTy, MinInt}; | ||
@@ -3,0 +3,0 @@ /// Scale the exponent. |
@@ -44,4 +44,5 @@ /* SPDX-License-Identifier: MIT */ | ||
| use super::super::support::{FpResult, IntTy, Round, Status, cold_path}; | ||
| use super::super::{CastFrom, CastInto, DInt, Float, HInt, Int, MinInt}; | ||
| use crate::support::{ | ||
| CastFrom, CastInto, DInt, Float, FpResult, HInt, Int, IntTy, MinInt, Round, Status, cold_path, | ||
| }; | ||
@@ -48,0 +49,0 @@ #[inline] |
| /* SPDX-License-Identifier: MIT | ||
| * origin: musl src/math/trunc.c */ | ||
| use super::super::support::{FpResult, Status}; | ||
| use super::super::{Float, Int, IntTy, MinInt}; | ||
| use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status}; | ||
@@ -7,0 +6,0 @@ #[inline] |
| //! Helpers for runtime target feature detection that are shared across architectures. | ||
| // `AtomicU32` is preferred for a consistent size across targets. | ||
| #[cfg(all(target_has_atomic = "ptr", not(target_has_atomic = "32")))] | ||
| compile_error!("currently all targets that support `AtomicPtr` also support `AtomicU32`"); | ||
| use core::sync::atomic::{AtomicU32, Ordering}; | ||
@@ -75,2 +79,3 @@ | ||
| #[allow(unused_imports)] | ||
| pub(crate) use {select_once, unique_masks}; | ||
@@ -77,0 +82,0 @@ |
@@ -5,3 +5,5 @@ #[macro_use] | ||
| mod env; | ||
| mod feature_detect; | ||
| // Runtime feature detection requires atomics. | ||
| #[cfg(target_has_atomic = "ptr")] | ||
| pub(crate) mod feature_detect; | ||
| mod float_traits; | ||
@@ -15,4 +17,2 @@ pub mod hex_float; | ||
| #[allow(unused_imports)] | ||
| pub(crate) use feature_detect::{Flags, get_or_init_flags_cache, select_once, unique_masks}; | ||
| #[allow(unused_imports)] | ||
| pub use float_traits::{DFloat, Float, HFloat, IntTy}; | ||
@@ -19,0 +19,0 @@ pub(crate) use float_traits::{f32_from_bits, f64_from_bits}; |
Sorry, the diff of this file is not supported yet