math: Enabled floating point intrinsics for RISCV32 microcontrollers

This commit is contained in:
D1plo1d
2022-09-17 11:47:21 -04:00
parent 83c4ff5f96
commit 1d5b952100

View File

@@ -118,8 +118,11 @@ no_mangle! {
fn truncf(x: f32) -> f32;
}
// only for the thumb*-none-eabi* targets
#[cfg(all(target_arch = "arm", target_os = "none"))]
// only for the thumb*-none-eabi* targets and riscv32*-none-elf targets that lack the floating point instruction set
#[cfg(any(
all(target_arch = "arm", target_os = "none"),
all(target_arch = "riscv32", not(target_feature = "f"), target_os = "none")
))]
no_mangle! {
fn fmin(x: f64, y: f64) -> f64;
fn fminf(x: f32, y: f32) -> f32;