Merge pull request #250 from japaric/fmod
expose fmod{,f} symbols on thumb
This commit is contained in:
commit
e3b8a228ed
|
@ -47,10 +47,10 @@ mod macros;
|
||||||
pub mod int;
|
pub mod int;
|
||||||
pub mod float;
|
pub mod float;
|
||||||
|
|
||||||
pub mod mem;
|
#[cfg(any(all(target_arch = "wasm32", target_os = "unknown"),
|
||||||
// only for the wasm32-unknown-unknown target
|
all(target_arch = "arm", target_os = "none")))]
|
||||||
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
|
|
||||||
pub mod math;
|
pub mod math;
|
||||||
|
pub mod mem;
|
||||||
|
|
||||||
#[cfg(target_arch = "arm")]
|
#[cfg(target_arch = "arm")]
|
||||||
pub mod arm;
|
pub mod arm;
|
||||||
|
|
11
src/math.rs
11
src/math.rs
|
@ -14,6 +14,8 @@ macro_rules! no_mangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// only for the wasm32-unknown-unknown target
|
||||||
|
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
|
||||||
no_mangle! {
|
no_mangle! {
|
||||||
fn acos(x: f64) -> f64;
|
fn acos(x: f64) -> f64;
|
||||||
fn asin(x: f64) -> f64;
|
fn asin(x: f64) -> f64;
|
||||||
|
@ -50,3 +52,12 @@ no_mangle! {
|
||||||
fn fma(x: f64, y: f64, z: f64) -> f64;
|
fn fma(x: f64, y: f64, z: f64) -> f64;
|
||||||
fn fmaf(x: f32, y: f32, z: f32) -> f32;
|
fn fmaf(x: f32, y: f32, z: f32) -> f32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// only for the thumb*-none-eabi* targets
|
||||||
|
#[cfg(all(target_arch = "arm", target_os = "none"))]
|
||||||
|
no_mangle! {
|
||||||
|
// `f64 % f64`
|
||||||
|
fn fmod(x: f64, y: f64) -> f64;
|
||||||
|
// `f32 % f32`
|
||||||
|
fn fmodf(x: f32, y: f32) -> f32;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue