Skip to content

Commit 21b4259

Browse files
committed
Start working on architectures appear in Rustdoc
related to #1055
1 parent 8a5da46 commit 21b4259

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

crates/core_arch/src/acle/hints.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
/// low-power state until one of a number of asynchronous events occurs.
1010
// Section 10.1 of ACLE says that the supported arches are: 8, 6K, 6-M
1111
// LLVM says "instruction requires: armv6k"
12-
#[cfg(any(target_feature = "v6", target_arch = "aarch64"))]
12+
#[cfg(any(target_feature = "v6", target_arch = "aarch64", doc))]
13+
#[doc(cfg(target_arch = "arm"))]
1314
#[inline(always)]
1415
pub unsafe fn __wfi() {
1516
hint(HINT_WFI);
@@ -22,7 +23,8 @@ pub unsafe fn __wfi() {
2223
/// another processor.
2324
// Section 10.1 of ACLE says that the supported arches are: 8, 6K, 6-M
2425
// LLVM says "instruction requires: armv6k"
25-
#[cfg(any(target_feature = "v6", target_arch = "aarch64"))]
26+
#[cfg(any(target_feature = "v6", target_arch = "aarch64", doc))]
27+
#[doc(cfg(target_arch = "arm"))]
2628
#[inline(always)]
2729
pub unsafe fn __wfe() {
2830
hint(HINT_WFE);
@@ -34,7 +36,8 @@ pub unsafe fn __wfe() {
3436
/// system. It is a NOP on a uniprocessor system.
3537
// Section 10.1 of ACLE says that the supported arches are: 8, 6K, 6-M, 7-M
3638
// LLVM says "instruction requires: armv6k"
37-
#[cfg(any(target_feature = "v6", target_arch = "aarch64"))]
39+
#[cfg(any(target_feature = "v6", target_arch = "aarch64", doc))]
40+
#[doc(cfg(target_arch = "aarch64"))]
3841
#[inline(always)]
3942
pub unsafe fn __sev() {
4043
hint(HINT_SEV);
@@ -49,7 +52,9 @@ pub unsafe fn __sev() {
4952
#[cfg(any(
5053
target_feature = "v8", // 32-bit ARMv8
5154
target_arch = "aarch64", // AArch64
55+
doc,
5256
))]
57+
#[doc(cfg(target_arch = "aarch64"))]
5358
#[inline(always)]
5459
pub unsafe fn __sevl() {
5560
hint(HINT_SEVL);
@@ -62,7 +67,8 @@ pub unsafe fn __sevl() {
6267
/// improve overall system performance.
6368
// Section 10.1 of ACLE says that the supported arches are: 8, 6K, 6-M
6469
// LLVM says "instruction requires: armv6k"
65-
#[cfg(any(target_feature = "v6", target_arch = "aarch64"))]
70+
#[cfg(any(target_feature = "v6", target_arch = "aarch64", doc))]
71+
#[doc(cfg(target_arch = "aarch64"))]
6672
#[inline(always)]
6773
pub unsafe fn __yield() {
6874
hint(HINT_YIELD);

0 commit comments

Comments
 (0)