Skip to content

Expose minimal floating point symbols for x86_64-unknown-none #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub mod int;

#[cfg(any(
all(target_family = "wasm", target_os = "unknown"),
all(target_arch = "x86_64", target_os = "none"),
all(target_arch = "x86_64", target_os = "uefi"),
all(target_arch = "arm", target_os = "none"),
target_os = "xous",
Expand Down
5 changes: 3 additions & 2 deletions src/math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ no_mangle! {
fn truncf(x: f32) -> f32;
}

// only for the thumb*-none-eabi* targets and riscv32*-none-elf targets that lack the floating point instruction set
// only for the thumb*-none-eabi*, riscv32*-none-elf and x86_64-unknown-none 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")
all(target_arch = "riscv32", not(target_feature = "f"), target_os = "none"),
all(target_arch = "x86_64", target_os = "none")
))]
no_mangle! {
fn fmin(x: f64, y: f64) -> f64;
Expand Down