Skip to content

Commit 5532b94

Browse files
authored
Merge pull request #493 from D1plo1d/riscv32_floating_point_math
2 parents 7275359 + 7da562d commit 5532b94

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/math.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ no_mangle! {
118118
fn truncf(x: f32) -> f32;
119119
}
120120

121-
// only for the thumb*-none-eabi* targets
122-
#[cfg(all(target_arch = "arm", target_os = "none"))]
121+
// only for the thumb*-none-eabi* targets and riscv32*-none-elf targets that lack the floating point instruction set
122+
#[cfg(any(
123+
all(target_arch = "arm", target_os = "none"),
124+
all(target_arch = "riscv32", not(target_feature = "f"), target_os = "none")
125+
))]
123126
no_mangle! {
124127
fn fmin(x: f64, y: f64) -> f64;
125128
fn fminf(x: f32, y: f32) -> f32;

0 commit comments

Comments
 (0)