Merge pull request #493 from D1plo1d/riscv32_floating_point_math

This commit is contained in:
Amanieu d'Antras 2022-09-20 16:19:02 +08:00 committed by GitHub
commit f0d43b1d21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;