From 67ebc4ae1480c5d5a1a9be05213e5dc30466f3ab Mon Sep 17 00:00:00 2001 From: Scott Mabin Date: Wed, 22 Feb 2023 20:35:06 +0000 Subject: [PATCH] Extend the intrinsics exported for Xtensa no_std --- library/compiler-builtins/src/lib.rs | 1 + library/compiler-builtins/src/math.rs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/library/compiler-builtins/src/lib.rs b/library/compiler-builtins/src/lib.rs index 10b4aafec312..71f249c8eb34 100644 --- a/library/compiler-builtins/src/lib.rs +++ b/library/compiler-builtins/src/lib.rs @@ -47,6 +47,7 @@ pub mod int; all(target_arch = "x86_64", target_os = "none"), all(target_arch = "x86_64", target_os = "uefi"), all(target_arch = "arm", target_os = "none"), + all(target_arch = "xtensa", target_os = "none"), target_os = "xous", all(target_vendor = "fortanix", target_env = "sgx") ))] diff --git a/library/compiler-builtins/src/math.rs b/library/compiler-builtins/src/math.rs index c64984e9ee7b..982c9499a211 100644 --- a/library/compiler-builtins/src/math.rs +++ b/library/compiler-builtins/src/math.rs @@ -86,7 +86,11 @@ no_mangle! { fn tanf(n: f32) -> f32; } -#[cfg(any(target_os = "xous", target_os = "uefi"))] +#[cfg(any( + target_os = "xous", + target_os = "uefi", + all(target_arch = "xtensa", target_os = "none"), +))] no_mangle! { fn sqrtf(x: f32) -> f32; fn sqrt(x: f64) -> f64; @@ -94,6 +98,7 @@ no_mangle! { #[cfg(any( all(target_vendor = "fortanix", target_env = "sgx"), + all(target_arch = "xtensa", target_os = "none"), target_os = "xous", target_os = "uefi" ))]