Skip to content

Commit e7bdba1

Browse files
Remove gating on target architecture in math.rs
Provide math builtins for every "none" target instead of gating on specific architectures
1 parent ce1e4d2 commit e7bdba1

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/math.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ macro_rules! no_mangle {
2323
),
2424
target_os = "xous",
2525
target_os = "uefi",
26-
all(target_arch = "xtensa", target_os = "none"),
26+
target_os = "none",
2727
all(target_vendor = "fortanix", target_env = "sgx")
2828
))]
2929
no_mangle! {
@@ -95,7 +95,7 @@ no_mangle! {
9595
),
9696
target_os = "xous",
9797
target_os = "uefi",
98-
all(target_arch = "xtensa", target_os = "none"),
98+
target_os = "none",
9999
all(target_vendor = "fortanix", target_env = "sgx"),
100100
target_os = "windows"
101101
))]
@@ -116,7 +116,7 @@ intrinsics! {
116116
#[cfg(any(
117117
target_os = "xous",
118118
target_os = "uefi",
119-
all(target_arch = "xtensa", target_os = "none"),
119+
target_os = "none",
120120
))]
121121
no_mangle! {
122122
fn sqrtf(x: f32) -> f32;
@@ -125,7 +125,7 @@ no_mangle! {
125125

126126
#[cfg(any(
127127
all(target_vendor = "fortanix", target_env = "sgx"),
128-
all(target_arch = "xtensa", target_os = "none"),
128+
target_os = "none",
129129
target_os = "xous",
130130
target_os = "uefi"
131131
))]
@@ -138,12 +138,8 @@ no_mangle! {
138138
fn truncf(x: f32) -> f32;
139139
}
140140

141-
// only for the thumb*-none-eabi*, riscv32*-none-elf, x86_64-unknown-none and mips*-unknown-none targets that lack the floating point instruction set
142141
#[cfg(any(
143-
all(target_arch = "arm", target_os = "none"),
144-
all(target_arch = "riscv32", not(target_feature = "f"), target_os = "none"),
145-
all(target_arch = "x86_64", target_os = "none"),
146-
all(target_arch = "mips", target_os = "none"),
142+
all(target_os = "none"),
147143
))]
148144
no_mangle! {
149145
fn fmin(x: f64, y: f64) -> f64;

0 commit comments

Comments
 (0)