Skip to content

Commit e201bf4

Browse files
ByronAmanieu
andauthored
Apply suggestions from code review
This should fix all build errors. Co-authored-by: Amanieu d'Antras <[email protected]>
1 parent ff89355 commit e201bf4

File tree

3 files changed

+35
-38
lines changed

3 files changed

+35
-38
lines changed

crates/core_arch/src/acle/hints.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ pub unsafe fn __sev() {
5151
target_arch = "aarch64", // AArch64
5252
doc,
5353
))]
54-
#[doc(cfg(target_arch = "aarch64"))]
5554
#[inline(always)]
5655
pub unsafe fn __sevl() {
5756
hint(HINT_SEVL);

crates/core_arch/src/acle/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,19 @@ mod ex;
6868

6969
pub use self::ex::*;
7070

71-
#[cfg(any(target_feature = "v7", doc))]
71+
#[cfg(any(target_arch = "aarch64", target_feature = "v7", doc))]
7272
mod crc;
73-
#[cfg(any(target_feature = "v7", doc))]
73+
#[cfg(any(target_arch = "aarch64", target_feature = "v7", doc))]
7474
pub use crc::*;
7575

7676
#[cfg(any(target_feature = "v7", doc))]
7777
mod crypto;
7878
#[cfg(any(arget_feature = "v7", doc))]
7979
pub use self::crypto::*;
8080

81+
#[cfg(any(target_arch = "aarch64", target_feature = "v7", doc))]
8182
pub(crate) mod neon;
83+
#[cfg(any(target_arch = "aarch64", target_feature = "v7", doc))]
8284
pub use self::neon::*;
8385

8486
mod sealed {

crates/core_arch/src/arm/mod.rs

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,73 +14,68 @@ mod v6;
1414
pub use self::v6::*;
1515

1616
// Supported arches: 6, 7-M. See Section 10.1 of ACLE (e.g. SSAT)
17-
#[cfg(any(all(not(target_arch = "aarch64"), target_feature = "v6",), doc))]
17+
#[cfg(any(target_feature = "v6", doc))]
1818
mod sat;
1919

20-
#[cfg(any(all(not(target_arch = "aarch64"), target_feature = "v6",), doc))]
20+
#[cfg(any(target_feature = "v6", doc))]
2121
pub use self::sat::*;
2222

2323
// Supported arches: 5TE, 7E-M. See Section 10.1 of ACLE (e.g. QADD)
2424
// We also include the A profile even though DSP is deprecated on that profile as of ACLE 2.0 (see
2525
// section 5.4.7)
2626
// Here we workaround the difference between LLVM's +dsp and ACLE's __ARM_FEATURE_DSP by gating on
2727
// '+v5te' rather than on '+dsp'
28-
#[cfg(any(all(
29-
not(target_arch = "aarch64"),
30-
any(
31-
// >= v5TE but excludes v7-M
32-
all(target_feature = "v5te", not(target_feature = "mclass")),
33-
// v7E-M
34-
all(target_feature = "mclass", target_feature = "dsp"),
35-
)
36-
), doc))]
28+
#[cfg(any(
29+
// >= v5TE but excludes v7-M
30+
all(target_feature = "v5te", not(target_feature = "mclass")),
31+
// v7E-M
32+
all(target_feature = "mclass", target_feature = "dsp"),
33+
doc,
34+
))]
3735
pub(crate) mod dsp;
3836

3937
#[cfg(any(
40-
all(
41-
not(target_arch = "aarch64"),
42-
any(
43-
all(target_feature = "v5te", not(target_feature = "mclass")),
44-
all(target_feature = "mclass", target_feature = "dsp"),
45-
)
46-
),
47-
doc
38+
// >= v5TE but excludes v7-M
39+
all(target_feature = "v5te", not(target_feature = "mclass")),
40+
// v7E-M
41+
all(target_feature = "mclass", target_feature = "dsp"),
42+
doc,
4843
))]
4944
pub use self::dsp::*;
5045

5146
// Deprecated in ACLE 2.0 for the A profile but fully supported on the M and R profiles, says
5247
// Section 5.4.9 of ACLE. We'll expose these for the A profile even if deprecated
53-
#[cfg(all(
54-
not(target_arch = "aarch64"),
55-
any(
56-
// v7-A, v7-R
57-
all(target_feature = "v6", not(target_feature = "mclass")),
58-
// v7E-M
59-
all(target_feature = "mclass", target_feature = "dsp")
60-
)
48+
#[cfg(any(
49+
// v7-A, v7-R
50+
all(target_feature = "v6", not(target_feature = "mclass")),
51+
// v7E-M
52+
all(target_feature = "mclass", target_feature = "dsp"),
53+
doc,
6154
))]
6255
mod simd32;
6356

64-
#[cfg(all(
65-
not(target_arch = "aarch64"),
66-
any(
67-
all(target_feature = "v6", not(target_feature = "mclass")),
68-
all(target_feature = "mclass", target_feature = "dsp")
69-
)
57+
#[cfg(any(
58+
// v7-A, v7-R
59+
all(target_feature = "v6", not(target_feature = "mclass")),
60+
// v7E-M
61+
all(target_feature = "mclass", target_feature = "dsp"),
62+
doc,
7063
))]
7164
pub use self::simd32::*;
7265

73-
#[cfg(any(target_arch = "aarch64", target_feature = "v7"))]
66+
#[cfg(any(target_feature = "v7", doc))]
7467
mod v7;
75-
#[cfg(any(target_arch = "aarch64", target_feature = "v7"))]
68+
#[cfg(any(target_feature = "v7", doc))]
7669
pub use self::v7::*;
7770

7871
pub use crate::core_arch::acle::*;
7972

8073
#[cfg(test)]
8174
use stdarch_test::assert_instr;
8275

76+
#[cfg(any(target_feature = "v7", doc))]
8377
pub(crate) mod neon;
78+
#[cfg(any(target_feature = "v7", doc))]
8479
pub use neon::*;
8580

8681
/// Generates the trap instruction `UDF`
@@ -92,4 +87,5 @@ pub unsafe fn udf() -> ! {
9287
}
9388

9489
#[cfg(test)]
90+
#[cfg(any(target_feature = "v7", doc))]
9591
pub(crate) mod test_support;

0 commit comments

Comments
 (0)