Use more intrinsics on msvc

This commit is contained in:
Alex Crichton 2017-06-23 07:52:38 -07:00
parent 8abb0ab826
commit 47ff81325c
4 changed files with 8 additions and 8 deletions

View File

@ -71,7 +71,7 @@ impl Mulo for i64 {}
impl Mulo for i128 {}
intrinsics! {
#[use_c_shim_if(target_arch = "x86")]
#[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))]
pub extern "C" fn __muldi3(a: u64, b: u64) -> u64 {
a.mul(b)
}

View File

@ -64,7 +64,7 @@ intrinsics! {
a.div(b)
}
#[use_c_shim_if(target_arch = "x86")]
#[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))]
pub extern "C" fn __divdi3(a: i64, b: i64) -> i64 {
a.div(b)
}
@ -79,7 +79,7 @@ intrinsics! {
a.mod_(b)
}
#[use_c_shim_if(target_arch = "x86")]
#[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))]
pub extern "C" fn __moddi3(a: i64, b: i64) -> i64 {
a.mod_(b)
}

View File

@ -65,7 +65,7 @@ impl Lshr for u64 {}
impl Lshr for u128 {}
intrinsics! {
#[use_c_shim_if(target_arch = "x86")]
#[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))]
pub extern "C" fn __ashldi3(a: u64, b: u32) -> u64 {
a.ashl(b)
}
@ -74,7 +74,7 @@ intrinsics! {
a.ashl(b)
}
#[use_c_shim_if(target_arch = "x86")]
#[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))]
pub extern "C" fn __ashrdi3(a: i64, b: u32) -> i64 {
a.ashr(b)
}
@ -83,7 +83,7 @@ intrinsics! {
a.ashr(b)
}
#[use_c_shim_if(target_arch = "x86")]
#[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))]
pub extern "C" fn __lshrdi3(a: u64, b: u32) -> u64 {
a.lshr(b)
}

View File

@ -227,13 +227,13 @@ intrinsics! {
q
}
#[use_c_shim_if(target_arch = "x86")]
#[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))]
/// Returns `n / d`
pub extern "C" fn __udivdi3(n: u64, d: u64) -> u64 {
__udivmoddi4(n, d, None)
}
#[use_c_shim_if(target_arch = "x86")]
#[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))]
/// Returns `n % d`
pub extern "C" fn __umoddi3(n: u64, d: u64) -> u64 {
let mut rem = 0;