소스 검색

expose ceil, floor and trunc on sgx-target

akashfortanix 6 년 전
부모
커밋
09a2d437f5
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      src/math.rs

+ 10 - 0
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! {