Skip to content

Commit 7be7f3b

Browse files
authored
Rollup merge of rust-lang#136356 - pthariensflame:patch-1, r=tgross35
Docs for f16 and f128: correct a typo and add details CC: rust-lang#116909; corrects and expands rust-lang#124750.
2 parents 7daf4cf + baa1cdd commit 7be7f3b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

library/core/src/primitive_docs.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1160,9 +1160,9 @@ impl<T> (T,) {}
11601160
///
11611161
/// Note that most common platforms will not support `f16` in hardware without enabling extra target
11621162
/// features, with the notable exception of Apple Silicon (also known as M1, M2, etc.) processors.
1163-
/// Hardware support on x86-64 requires the avx512fp16 feature, while RISC-V requires Zhf.
1164-
/// Usually the fallback implementation will be to use `f32` hardware if it exists, and convert
1165-
/// between `f16` and `f32` when performing math.
1163+
/// Hardware support on x86/x86-64 requires the avx512fp16 or avx10.1 features, while RISC-V requires
1164+
/// Zfh, and Arm/AArch64 requires FEAT_FP16. Usually the fallback implementation will be to use `f32`
1165+
/// hardware if it exists, and convert between `f16` and `f32` when performing math.
11661166
///
11671167
/// *[See also the `std::f16::consts` module](crate::f16::consts).*
11681168
///
@@ -1344,10 +1344,10 @@ mod prim_f64 {}
13441344
/// quad-precision values][wikipedia] for more information.
13451345
///
13461346
/// Note that no platforms have hardware support for `f128` without enabling target specific features,
1347-
/// as for all instruction set architectures `f128` is considered an optional feature.
1348-
/// Only Power ISA ("PowerPC") and RISC-V specify it, and only certain microarchitectures
1349-
/// actually implement it. For x86-64 and AArch64, ISA support is not even specified,
1350-
/// so it will always be a software implementation significantly slower than `f64`.
1347+
/// as for all instruction set architectures `f128` is considered an optional feature. Only Power ISA
1348+
/// ("PowerPC") and RISC-V (via the Q extension) specify it, and only certain microarchitectures
1349+
/// actually implement it. For x86-64 and AArch64, ISA support is not even specified, so it will always
1350+
/// be a software implementation significantly slower than `f64`.
13511351
///
13521352
/// _Note: `f128` support is incomplete. Many platforms will not be able to link math functions. On
13531353
/// x86 in particular, these functions do link but their results are always incorrect._

0 commit comments

Comments
 (0)