Skip to content

Commit d73ccba

Browse files
committed
Use intrinsics! macro for math intrinsics
Make sure they respect the `mangled-names` feature as well as have the `"C"` ABI.
1 parent cc78ff6 commit d73ccba

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/math.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ mod libm;
44

55
macro_rules! no_mangle {
66
($(fn $fun:ident($($iid:ident : $ity:ty),+) -> $oty:ty;)+) => {
7-
$(
8-
#[no_mangle]
9-
pub fn $fun($($iid: $ity),+) -> $oty {
10-
self::libm::$fun($($iid),+)
11-
}
12-
)+
7+
intrinsics! {
8+
$(
9+
pub extern "C" fn $fun($($iid: $ity),+) -> $oty {
10+
self::libm::$fun($($iid),+)
11+
}
12+
)+
13+
}
1314
}
1415
}
1516

0 commit comments

Comments
 (0)