diff --git a/src/int/mul.rs b/src/int/mul.rs index e04e86c..db9f0d9 100644 --- a/src/int/mul.rs +++ b/src/int/mul.rs @@ -1,4 +1,6 @@ -use int::{Int, LargeInt}; +#[cfg(not(all(feature = "c", target_arch = "x86")))] +use int::LargeInt; +use int::Int; macro_rules! mul { ($intrinsic:ident: $ty:ty) => { diff --git a/src/int/shift.rs b/src/int/shift.rs index 995f8d6..9338f07 100644 --- a/src/int/shift.rs +++ b/src/int/shift.rs @@ -1,3 +1,4 @@ +#[cfg(not(all(feature = "c", target_arch = "x86")))] use int::{Int, LargeInt}; macro_rules! ashl { diff --git a/src/int/udiv.rs b/src/int/udiv.rs index 4a14d3c..b60c875 100644 --- a/src/int/udiv.rs +++ b/src/int/udiv.rs @@ -1,4 +1,4 @@ -use core::{intrinsics, mem}; +use core::intrinsics; use int::{Int, LargeInt}; /// Returns `n / d` @@ -107,6 +107,8 @@ pub extern "C" fn __udivdi3(n: u64, d: u64) -> u64 { #[cfg(not(all(feature = "c", target_arch = "x86")))] #[cfg_attr(not(test), no_mangle)] pub extern "C" fn __umoddi3(a: u64, b: u64) -> u64 { + use core::mem; + let mut rem = unsafe { mem::uninitialized() }; __udivmoddi4(a, b, Some(&mut rem)); rem