math: compile math functions for Xous
This adds support for Xous, enabling users to call math functions on primitives such as `cos()`. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
@@ -20,6 +20,7 @@ macro_rules! no_mangle {
|
||||
target_os = "unknown",
|
||||
not(target_env = "wasi")
|
||||
),
|
||||
target_os = "xous",
|
||||
all(target_arch = "x86_64", target_os = "uefi"),
|
||||
all(target_arch = "xtensa", target_os = "none"),
|
||||
all(target_vendor = "fortanix", target_env = "sgx")
|
||||
@@ -70,6 +71,7 @@ no_mangle! {
|
||||
target_os = "unknown",
|
||||
not(target_env = "wasi")
|
||||
),
|
||||
target_os = "xous",
|
||||
all(target_arch = "xtensa", target_os = "none"),
|
||||
all(target_vendor = "fortanix", target_env = "sgx")
|
||||
))]
|
||||
@@ -93,7 +95,16 @@ no_mangle! {
|
||||
fn tanf(n: f32) -> f32;
|
||||
}
|
||||
|
||||
#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
|
||||
#[cfg(target_os = "xous")]
|
||||
no_mangle! {
|
||||
fn sqrtf(x: f32) -> f32;
|
||||
fn sqrt(x: f64) -> f64;
|
||||
}
|
||||
|
||||
#[cfg(any(
|
||||
all(target_vendor = "fortanix", target_env = "sgx"),
|
||||
target_os = "xous"
|
||||
))]
|
||||
no_mangle! {
|
||||
fn ceil(x: f64) -> f64;
|
||||
fn ceilf(x: f32) -> f32;
|
||||
|
||||
Reference in New Issue
Block a user