Skip to content

Commit 8ee91aa

Browse files
committed
Revised yield hints
Turns out v7 targets always have v6t2 set, so that line was redundant. Also add a link to the Arm Armv7 A.R.M.
1 parent 33fbdff commit 8ee91aa

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

library/core/src/hint.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,12 @@ pub fn spin_loop() {
298298
all(target_feature = "v6k", not(target_feature = "thumb-mode")),
299299
target_feature = "v6t2",
300300
all(target_feature = "v6", target_feature = "mclass"),
301-
target_feature = "v7",
302301
)
303302
) => {
304-
// SAFETY: the `cfg` attr ensures that we only execute this on arm targets
305-
// with support for the v6 feature.
303+
// SAFETY: the `cfg` attr ensures that we only execute this on arm
304+
// targets with support for the this feature. On ARMv6 in Thumb
305+
// mode, T2 is required (see Arm DDI0406C Section A8.8.427),
306+
// otherwise ARMv6-M or ARMv6K is enough
306307
unsafe { crate::arch::arm::__yield() }
307308
}
308309
target_arch = "loongarch32" => crate::arch::loongarch32::ibar::<0>(),

library/stdarch/crates/core_arch/src/arm_shared/hints.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,11 @@ pub unsafe fn __sevl() {
8383
/// improve overall system performance.
8484
// Section 10.1 of ACLE says that the supported arches are: 8, 6K, 6-M
8585
// LLVM says "instruction requires: armv6k"
86-
// On ARMv6 in Thumb mode, T2 is required.
86+
// On ARMv6 in Thumb mode, T2 is required (see Arm DDI0406C Section A8.8.427)
8787
#[cfg(any(
8888
all(target_feature = "v6k", not(target_feature = "thumb-mode")),
8989
target_feature = "v6t2",
9090
all(target_feature = "v6", target_feature = "mclass"),
91-
target_feature = "v7",
9291
target_arch = "aarch64",
9392
target_arch = "arm64ec",
9493
doc

0 commit comments

Comments
 (0)