about summary refs log tree commit diff
path: root/library/stdarch/crates/std_detect
diff options
context:
space:
mode:
Diffstat (limited to 'library/stdarch/crates/std_detect')
-rw-r--r--library/stdarch/crates/std_detect/src/detect/mod.rs4
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/darwin/aarch64.rs (renamed from library/stdarch/crates/std_detect/src/detect/os/macos/aarch64.rs)4
-rw-r--r--library/stdarch/crates/std_detect/tests/cpu-detection.rs4
3 files changed, 7 insertions, 5 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/mod.rs b/library/stdarch/crates/std_detect/src/detect/mod.rs
index ae86ca987ee..ab247a303ed 100644
--- a/library/stdarch/crates/std_detect/src/detect/mod.rs
+++ b/library/stdarch/crates/std_detect/src/detect/mod.rs
@@ -66,8 +66,8 @@ cfg_if! {
     } else if #[cfg(all(target_os = "windows", any(target_arch = "aarch64", target_arch = "arm64ec")))] {
         #[path = "os/windows/aarch64.rs"]
         mod os;
-    } else if #[cfg(all(target_os = "macos", target_arch = "aarch64", feature = "libc"))] {
-        #[path = "os/macos/aarch64.rs"]
+    } else if #[cfg(all(target_vendor = "apple", target_arch = "aarch64", feature = "libc"))] {
+        #[path = "os/darwin/aarch64.rs"]
         mod os;
     } else {
         #[path = "os/other.rs"]
diff --git a/library/stdarch/crates/std_detect/src/detect/os/macos/aarch64.rs b/library/stdarch/crates/std_detect/src/detect/os/darwin/aarch64.rs
index a29968b5c3d..3f292c1b1b1 100644
--- a/library/stdarch/crates/std_detect/src/detect/os/macos/aarch64.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/darwin/aarch64.rs
@@ -1,4 +1,6 @@
-//! Run-time feature detection for aarch64 on macOS.
+//! Run-time feature detection for aarch64 on Darwin (macOS/iOS/tvOS/watchOS/visionOS).
+//!
+//! <https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics>
 
 use crate::detect::{cache, Feature};
 
diff --git a/library/stdarch/crates/std_detect/tests/cpu-detection.rs b/library/stdarch/crates/std_detect/tests/cpu-detection.rs
index cecc53afa4b..53fbf6d8c1d 100644
--- a/library/stdarch/crates/std_detect/tests/cpu-detection.rs
+++ b/library/stdarch/crates/std_detect/tests/cpu-detection.rs
@@ -188,8 +188,8 @@ fn aarch64_bsd() {
 }
 
 #[test]
-#[cfg(all(target_arch = "aarch64", target_os = "macos"))]
-fn aarch64_macos() {
+#[cfg(all(target_arch = "aarch64", target_vendor = "apple"))]
+fn aarch64_darwin() {
     println!("asimd: {:?}", is_aarch64_feature_detected!("asimd"));
     println!("fp: {:?}", is_aarch64_feature_detected!("fp"));
     println!("fp16: {:?}", is_aarch64_feature_detected!("fp16"));