diff options
Diffstat (limited to 'libcore/intrinsics.rs')
| -rw-r--r-- | libcore/intrinsics.rs | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/libcore/intrinsics.rs b/libcore/intrinsics.rs index 4ab434d..45890cd 100644 --- a/libcore/intrinsics.rs +++ b/libcore/intrinsics.rs @@ -53,34 +53,14 @@ extern "rust-intrinsic" { // NB: These intrinsics take raw pointers because they mutate aliased // memory, which is not valid for either `&` or `&mut`. - #[cfg(all(stage0, not(cargobuild)))] - pub fn atomic_cxchg<T>(dst: *mut T, old: T, src: T) -> T; - #[cfg(all(stage0, not(cargobuild)))] - pub fn atomic_cxchg_acq<T>(dst: *mut T, old: T, src: T) -> T; - #[cfg(all(stage0, not(cargobuild)))] - pub fn atomic_cxchg_rel<T>(dst: *mut T, old: T, src: T) -> T; - #[cfg(all(stage0, not(cargobuild)))] - pub fn atomic_cxchg_acqrel<T>(dst: *mut T, old: T, src: T) -> T; - #[cfg(all(stage0, not(cargobuild)))] - pub fn atomic_cxchg_relaxed<T>(dst: *mut T, old: T, src: T) -> T; - - #[cfg(any(not(stage0), cargobuild))] pub fn atomic_cxchg<T>(dst: *mut T, old: T, src: T) -> (T, bool); - #[cfg(any(not(stage0), cargobuild))] pub fn atomic_cxchg_acq<T>(dst: *mut T, old: T, src: T) -> (T, bool); - #[cfg(any(not(stage0), cargobuild))] pub fn atomic_cxchg_rel<T>(dst: *mut T, old: T, src: T) -> (T, bool); - #[cfg(any(not(stage0), cargobuild))] pub fn atomic_cxchg_acqrel<T>(dst: *mut T, old: T, src: T) -> (T, bool); - #[cfg(any(not(stage0), cargobuild))] pub fn atomic_cxchg_relaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool); - #[cfg(any(not(stage0), cargobuild))] pub fn atomic_cxchg_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool); - #[cfg(any(not(stage0), cargobuild))] pub fn atomic_cxchg_failacq<T>(dst: *mut T, old: T, src: T) -> (T, bool); - #[cfg(any(not(stage0), cargobuild))] pub fn atomic_cxchg_acq_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool); - #[cfg(any(not(stage0), cargobuild))] pub fn atomic_cxchg_acqrel_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool); pub fn atomic_cxchgweak<T>(dst: *mut T, old: T, src: T) -> (T, bool); @@ -448,10 +428,7 @@ extern "rust-intrinsic" { pub fn volatile_load<T>(src: *const T) -> T; /// Perform a volatile store to the `dst` pointer. pub fn volatile_store<T>(dst: *mut T, val: T); -} -#[cfg(not(disable_float))] -extern "rust-intrinsic" { /// Returns the square root of an `f32` pub fn sqrtf32(x: f32) -> f32; /// Returns the square root of an `f64` @@ -551,31 +528,25 @@ extern "rust-intrinsic" { /// Float addition that allows optimizations based on algebraic rules. /// May assume inputs are finite. - #[cfg(not(stage0))] pub fn fadd_fast<T>(a: T, b: T) -> T; /// Float subtraction that allows optimizations based on algebraic rules. /// May assume inputs are finite. - #[cfg(not(stage0))] pub fn fsub_fast<T>(a: T, b: T) -> T; /// Float multiplication that allows optimizations based on algebraic rules. /// May assume inputs are finite. - #[cfg(not(stage0))] pub fn fmul_fast<T>(a: T, b: T) -> T; /// Float division that allows optimizations based on algebraic rules. /// May assume inputs are finite. - #[cfg(not(stage0))] pub fn fdiv_fast<T>(a: T, b: T) -> T; /// Float remainder that allows optimizations based on algebraic rules. /// May assume inputs are finite. - #[cfg(not(stage0))] pub fn frem_fast<T>(a: T, b: T) -> T; -} -extern "rust-intrinsic" { + /// Returns the number of bits set in an integer type `T` pub fn ctpop<T>(x: T) -> T; |