From f1971b5b710a35c758e5662af904b4e28f7426ff Mon Sep 17 00:00:00 2001 From: akashfortanix Date: Thu, 27 Dec 2018 19:13:50 +0530 Subject: [PATCH] expose ceil, floor and trunc on sgx-target --- library/compiler-builtins/src/math.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/library/compiler-builtins/src/math.rs b/library/compiler-builtins/src/math.rs index c37243504b1b..e2b15c6a7b59 100644 --- a/library/compiler-builtins/src/math.rs +++ b/library/compiler-builtins/src/math.rs @@ -66,6 +66,16 @@ no_mangle! { fn tanhf(n: f32) -> f32; } +#[cfg(target_env = "sgx")] +no_mangle! { + fn ceil(x: f64) -> f64; + fn ceilf(x: f32) -> f32; + fn floor(x: f64) -> f64; + fn floorf(x: f32) -> f32; + fn trunc(x: f64) -> f64; + fn truncf(x: f32) -> f32; +} + // only for the thumb*-none-eabi* targets #[cfg(all(target_arch = "arm", target_os = "none"))] no_mangle! {