Tweak usage of C shims on MSVC

This commit is contained in:
Alex Crichton 2017-06-23 12:02:28 -07:00
parent a16ebb0dcb
commit 5172f8c218
1 changed files with 6 additions and 2 deletions

View File

@ -78,7 +78,10 @@ intrinsics! {
int_to_float!(i, i32, f64) int_to_float!(i, i32, f64)
} }
#[use_c_shim_if(any(target_arch = "x86", target_arch = "x86_64"))] #[use_c_shim_if(any(
all(not(target_env = "msvc"), target_arch = "x86", target_arch = "x86_64"),
all(target_env = "msvc", target_arch = "x86_64"),
))]
pub extern "C" fn __floatdidf(i: i64) -> f64 { pub extern "C" fn __floatdidf(i: i64) -> f64 {
int_to_float!(i, i64, f64) int_to_float!(i, i64, f64)
} }
@ -101,7 +104,8 @@ intrinsics! {
int_to_float!(i, u32, f64) int_to_float!(i, u32, f64)
} }
#[use_c_shim_if(any(target_arch = "x86", target_arch = "x86_64"))] #[use_c_shim_if(all(any(target_arch = "x86", target_arch = "x86_64"),
not(target_env = "msvc")))]
pub extern "C" fn __floatundidf(i: u64) -> f64 { pub extern "C" fn __floatundidf(i: u64) -> f64 {
int_to_float!(i, u64, f64) int_to_float!(i, u64, f64)
} }