Skip to content

Commit 0703bfa

Browse files
committed
Fix some use_c_shim_if directives
This was an accidental regression introduced in #252 by removing compilation of C files without adjusting the `#[use_c_shim_if]` directives. This restores the compilation of the assembly files and updates the `#[use_c_shim_if]` directives.
1 parent 5a88717 commit 0703bfa

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,10 @@ mod c {
267267
if target_arch == "x86_64" {
268268
sources.extend(
269269
&[
270+
"x86_64/floatdisf.c",
270271
"x86_64/floatdixf.c",
271272
"x86_64/floatundidf.S",
273+
"x86_64/floatundisf.S",
272274
"x86_64/floatundixf.S",
273275
],
274276
);

src/float/conv.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ intrinsics! {
8080
int_to_float!(i, i32, f64)
8181
}
8282

83-
#[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))]
83+
#[use_c_shim_if(any(
84+
all(target_arch = "x86", not(target_env = "msvc")),
85+
all(target_arch = "x86_64", not(windows)),
86+
))]
8487
#[arm_aeabi_alias = __aeabi_l2f]
8588
pub extern "C" fn __floatdisf(i: i64) -> f32 {
8689
// On x86_64 LLVM will use native instructions for this conversion, we
@@ -124,17 +127,19 @@ intrinsics! {
124127
int_to_float!(i, u32, f64)
125128
}
126129

127-
#[use_c_shim_if(all(not(target_env = "msvc"),
128-
any(target_arch = "x86",
129-
all(not(windows), target_arch = "x86_64"))))]
130+
#[use_c_shim_if(any(
131+
all(target_arch = "x86", not(target_env = "msvc")),
132+
all(target_arch = "x86_64", not(windows)),
133+
))]
130134
#[arm_aeabi_alias = __aeabi_ul2f]
131135
pub extern "C" fn __floatundisf(i: u64) -> f32 {
132136
int_to_float!(i, u64, f32)
133137
}
134138

135-
#[use_c_shim_if(all(not(target_env = "msvc"),
136-
any(target_arch = "x86",
137-
all(not(windows), target_arch = "x86_64"))))]
139+
#[use_c_shim_if(any(
140+
all(target_arch = "x86", not(target_env = "msvc")),
141+
all(target_arch = "x86_64", not(windows)),
142+
))]
138143
#[arm_aeabi_alias = __aeabi_ul2d]
139144
pub extern "C" fn __floatundidf(i: u64) -> f64 {
140145
int_to_float!(i, u64, f64)

0 commit comments

Comments
 (0)