Skip to content
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

std: Set has_reliable_f16 to false for MIPS targets in build.rs #127235

Merged
merged 3 commits into from
Jul 8, 2024
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
15 changes: 9 additions & 6 deletions library/core/src/num/f16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,8 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # // FIXME(f16_f128): remove when `extendhfsf2` and `truncsfhf2` are available
/// # #[cfg(target_os = "linux")] {
/// # // FIXME(f16_f128): extendhfsf2, truncsfhf2, __gnu_h2f_ieee, __gnu_f2h_ieee missing for many platforms
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
///
/// let x = 2.0_f16;
/// let abs_difference = (x.recip() - (1.0 / x)).abs();
Expand All @@ -528,8 +528,8 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # // FIXME(f16_f128): remove when `extendhfsf2` and `truncsfhf2` are available
/// # #[cfg(target_os = "linux")] {
/// # // FIXME(f16_f128): extendhfsf2, truncsfhf2, __gnu_h2f_ieee, __gnu_f2h_ieee missing for many platforms
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
///
/// let angle = std::f16::consts::PI;
///
Expand All @@ -551,8 +551,8 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # // FIXME(f16_f128): remove when `extendhfsf2` and `truncsfhf2` are available
/// # #[cfg(target_os = "linux")] {
/// # // FIXME(f16_f128): extendhfsf2, truncsfhf2, __gnu_h2f_ieee, __gnu_f2h_ieee missing for many platforms
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
///
/// let angle = 180.0f16;
///
Expand Down Expand Up @@ -870,6 +870,8 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # // FIXME(f16_f128): extendhfsf2, truncsfhf2, __gnu_h2f_ieee, __gnu_f2h_ieee missing for many platforms
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
///
/// struct GoodBoy {
/// name: &'static str,
Expand Down Expand Up @@ -897,6 +899,7 @@ impl f16 {
/// .zip([-5.0, 0.1, 10.0, 99.0, f16::INFINITY, f16::NAN].iter())
/// .for_each(|(a, b)| assert_eq!(a.to_bits(), b.to_bits()))
/// }
/// # }
/// ```
#[inline]
#[must_use]
Expand Down
4 changes: 3 additions & 1 deletion library/std/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ fn main() {
// the compiler-builtins update. <https://github.com/rust-lang/rust/issues/123885>
("x86" | "x86_64", _) => false,
// Missing `__gnu_h2f_ieee` and `__gnu_f2h_ieee`
("powerpc" | "powerpc64" | "powerpc64le", _) => false,
("powerpc" | "powerpc64", _) => false,
// Missing `__gnu_h2f_ieee` and `__gnu_f2h_ieee`
("mips" | "mips32r6" | "mips64" | "mips64r6", _) => false,
// Missing `__extendhfsf` and `__truncsfhf`
("riscv32" | "riscv64", _) => false,
// Most OSs are missing `__extendhfsf` and `__truncsfhf`
Expand Down
Loading