about summary refs log tree commit diff
path: root/library
diff options
context:
space:
mode:
authorWANG Rui <wangrui@loongson.cn>2025-05-24 19:20:17 +0800
committerWANG Rui <wangrui@loongson.cn>2025-05-29 09:30:25 +0800
commitb2858f313299f812915e5de4d68874d27149be8a (patch)
tree22f87051acc69bd49615dd880eb6db40be8fee59 /library
parent6f69710780d579b180ab38da4c1384d630f7bd31 (diff)
downloadrust-b2858f313299f812915e5de4d68874d27149be8a.tar.gz
rust-b2858f313299f812915e5de4d68874d27149be8a.zip
Add `loongarch64` with `d` feature to `f32::midpoint` fast path
This patch enables the optimized implementation of `f32::midpoint` for
`loongarch64` targets that support the `d`feature. Targets with reliable
64-bit float support can safely use the faster and more accurate computation
via `f64`, avoiding the fallback branchy version.
Diffstat (limited to 'library')
-rw-r--r--library/core/src/num/f32.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs
index bf67b6ed05a..6636054a659 100644
--- a/library/core/src/num/f32.rs
+++ b/library/core/src/num/f32.rs
@@ -999,6 +999,7 @@ impl f32 {
                 target_arch = "x86_64",
                 target_arch = "aarch64",
                 all(any(target_arch = "riscv32", target_arch = "riscv64"), target_feature = "d"),
+                all(target_arch = "loongarch64", target_feature = "d"),
                 all(target_arch = "arm", target_feature = "vfp2"),
                 target_arch = "wasm32",
                 target_arch = "wasm64",