Skip to content

Commit 7e777df

Browse files
authored
Rollup merge of rust-lang#90621 - adamgemmell:dev/stabilise-target-feature, r=Amanieu
Stabilise `aarch64_target_feature` Draft stabilisation PR - rust-lang#90620
2 parents e08d569 + 4e9bc91 commit 7e777df

File tree

8 files changed

+50
-52
lines changed

8 files changed

+50
-52
lines changed

compiler/rustc_codegen_ssa/src/target_features.rs

+45-45
Original file line numberDiff line numberDiff line change
@@ -41,95 +41,95 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
4141

4242
const AARCH64_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
4343
// FEAT_AdvSimd
44-
("neon", Some(sym::aarch64_target_feature)),
44+
("neon", None),
4545
// FEAT_FP
46-
("fp", Some(sym::aarch64_target_feature)),
46+
("fp", None),
4747
// FEAT_FP16
48-
("fp16", Some(sym::aarch64_target_feature)),
48+
("fp16", None),
4949
// FEAT_SVE
50-
("sve", Some(sym::aarch64_target_feature)),
50+
("sve", None),
5151
// FEAT_CRC
52-
("crc", Some(sym::aarch64_target_feature)),
52+
("crc", None),
5353
// FEAT_RAS
54-
("ras", Some(sym::aarch64_target_feature)),
54+
("ras", None),
5555
// FEAT_LSE
56-
("lse", Some(sym::aarch64_target_feature)),
56+
("lse", None),
5757
// FEAT_RDM
58-
("rdm", Some(sym::aarch64_target_feature)),
58+
("rdm", None),
5959
// FEAT_RCPC
60-
("rcpc", Some(sym::aarch64_target_feature)),
60+
("rcpc", None),
6161
// FEAT_RCPC2
62-
("rcpc2", Some(sym::aarch64_target_feature)),
62+
("rcpc2", None),
6363
// FEAT_DotProd
64-
("dotprod", Some(sym::aarch64_target_feature)),
64+
("dotprod", None),
6565
// FEAT_TME
66-
("tme", Some(sym::aarch64_target_feature)),
66+
("tme", None),
6767
// FEAT_FHM
68-
("fhm", Some(sym::aarch64_target_feature)),
68+
("fhm", None),
6969
// FEAT_DIT
70-
("dit", Some(sym::aarch64_target_feature)),
70+
("dit", None),
7171
// FEAT_FLAGM
72-
("flagm", Some(sym::aarch64_target_feature)),
72+
("flagm", None),
7373
// FEAT_SSBS
74-
("ssbs", Some(sym::aarch64_target_feature)),
74+
("ssbs", None),
7575
// FEAT_SB
76-
("sb", Some(sym::aarch64_target_feature)),
76+
("sb", None),
7777
// FEAT_PAUTH (address authentication)
78-
("paca", Some(sym::aarch64_target_feature)),
78+
("paca", None),
7979
// FEAT_PAUTH (generic authentication)
80-
("pacg", Some(sym::aarch64_target_feature)),
80+
("pacg", None),
8181
// FEAT_DPB
82-
("dpb", Some(sym::aarch64_target_feature)),
82+
("dpb", None),
8383
// FEAT_DPB2
84-
("dpb2", Some(sym::aarch64_target_feature)),
84+
("dpb2", None),
8585
// FEAT_SVE2
86-
("sve2", Some(sym::aarch64_target_feature)),
86+
("sve2", None),
8787
// FEAT_SVE2_AES
88-
("sve2-aes", Some(sym::aarch64_target_feature)),
88+
("sve2-aes", None),
8989
// FEAT_SVE2_SM4
90-
("sve2-sm4", Some(sym::aarch64_target_feature)),
90+
("sve2-sm4", None),
9191
// FEAT_SVE2_SHA3
92-
("sve2-sha3", Some(sym::aarch64_target_feature)),
92+
("sve2-sha3", None),
9393
// FEAT_SVE2_BitPerm
94-
("sve2-bitperm", Some(sym::aarch64_target_feature)),
94+
("sve2-bitperm", None),
9595
// FEAT_FRINTTS
96-
("frintts", Some(sym::aarch64_target_feature)),
96+
("frintts", None),
9797
// FEAT_I8MM
98-
("i8mm", Some(sym::aarch64_target_feature)),
98+
("i8mm", None),
9999
// FEAT_F32MM
100-
("f32mm", Some(sym::aarch64_target_feature)),
100+
("f32mm", None),
101101
// FEAT_F64MM
102-
("f64mm", Some(sym::aarch64_target_feature)),
102+
("f64mm", None),
103103
// FEAT_BF16
104-
("bf16", Some(sym::aarch64_target_feature)),
104+
("bf16", None),
105105
// FEAT_RAND
106-
("rand", Some(sym::aarch64_target_feature)),
106+
("rand", None),
107107
// FEAT_BTI
108-
("bti", Some(sym::aarch64_target_feature)),
108+
("bti", None),
109109
// FEAT_MTE
110-
("mte", Some(sym::aarch64_target_feature)),
110+
("mte", None),
111111
// FEAT_JSCVT
112-
("jsconv", Some(sym::aarch64_target_feature)),
112+
("jsconv", None),
113113
// FEAT_FCMA
114-
("fcma", Some(sym::aarch64_target_feature)),
114+
("fcma", None),
115115
// FEAT_AES
116-
("aes", Some(sym::aarch64_target_feature)),
116+
("aes", None),
117117
// FEAT_SHA1 & FEAT_SHA256
118-
("sha2", Some(sym::aarch64_target_feature)),
118+
("sha2", None),
119119
// FEAT_SHA512 & FEAT_SHA3
120-
("sha3", Some(sym::aarch64_target_feature)),
120+
("sha3", None),
121121
// FEAT_SM3 & FEAT_SM4
122-
("sm4", Some(sym::aarch64_target_feature)),
122+
("sm4", None),
123123
// FEAT_PAN
124-
("pan", Some(sym::aarch64_target_feature)),
124+
("pan", None),
125125
// FEAT_LOR
126-
("lor", Some(sym::aarch64_target_feature)),
126+
("lor", None),
127127
// FEAT_VHE
128-
("vh", Some(sym::aarch64_target_feature)),
128+
("vh", None),
129129
// FEAT_PMUv3
130-
("pmuv3", Some(sym::aarch64_target_feature)),
130+
("pmuv3", None),
131131
// FEAT_SPE
132-
("spe", Some(sym::aarch64_target_feature)),
132+
("spe", None),
133133
("v8.1a", Some(sym::aarch64_target_feature)),
134134
("v8.2a", Some(sym::aarch64_target_feature)),
135135
("v8.3a", Some(sym::aarch64_target_feature)),

compiler/rustc_feature/src/accepted.rs

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ declare_features! (
4646
// feature-group-start: accepted features
4747
// -------------------------------------------------------------------------
4848

49+
/// Allows `#[target_feature(...)]` on aarch64 platforms
50+
(accepted, aarch64_target_feature, "1.60.0", Some(44839), None),
4951
/// Allows the sysV64 ABI to be specified on all platforms
5052
/// instead of just the platforms on which it is the C ABI.
5153
(accepted, abi_sysv64, "1.24.0", Some(36167), None),

compiler/rustc_feature/src/active.rs

-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ declare_features! (
233233
// FIXME: Document these and merge with the list below.
234234

235235
// Unstable `#[target_feature]` directives.
236-
(active, aarch64_target_feature, "1.27.0", Some(44839), None),
237236
(active, adx_target_feature, "1.32.0", Some(44839), None),
238237
(active, arm_target_feature, "1.27.0", Some(44839), None),
239238
(active, avx512_target_feature, "1.27.0", Some(44839), None),

compiler/rustc_typeck/src/collect.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// ignore-tidy-filelength
21
//! "Collection" is the process of determining the type and other external
32
//! details of each item in Rust. Collection is specifically concerned
43
//! with *inter-procedural* things -- for example, for a function
@@ -2692,7 +2691,6 @@ fn from_target_feature(
26922691
// Only allow features whose feature gates have been enabled.
26932692
let allowed = match feature_gate.as_ref().copied() {
26942693
Some(sym::arm_target_feature) => rust_features.arm_target_feature,
2695-
Some(sym::aarch64_target_feature) => rust_features.aarch64_target_feature,
26962694
Some(sym::hexagon_target_feature) => rust_features.hexagon_target_feature,
26972695
Some(sym::powerpc_target_feature) => rust_features.powerpc_target_feature,
26982696
Some(sym::mips_target_feature) => rust_features.mips_target_feature,

library/core/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
#![feature(asm_const)]
203203
//
204204
// Target features:
205-
#![feature(aarch64_target_feature)]
205+
#![cfg_attr(bootstrap, feature(aarch64_target_feature))]
206206
#![feature(adx_target_feature)]
207207
#![feature(arm_target_feature)]
208208
#![feature(avx512_target_feature)]

src/test/ui/target-feature/gate.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// gate-test-avx512_target_feature
1717
// gate-test-tbm_target_feature
1818
// gate-test-arm_target_feature
19-
// gate-test-aarch64_target_feature
2019
// gate-test-hexagon_target_feature
2120
// gate-test-mips_target_feature
2221
// gate-test-wasm_target_feature

src/test/ui/target-feature/gate.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: the target feature `avx512bw` is currently unstable
2-
--> $DIR/gate.rs:32:18
2+
--> $DIR/gate.rs:31:18
33
|
44
LL | #[target_feature(enable = "avx512bw")]
55
| ^^^^^^^^^^^^^^^^^^^

src/test/ui/target-feature/tied-features.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// only-aarch64
22
// build-fail
33

4-
#![feature(aarch64_target_feature, target_feature_11)]
4+
#![cfg_attr(bootstrap, feature(aarch64_target_feature))]
55

66
fn main() {
77
#[target_feature(enable = "pacg")]

0 commit comments

Comments
 (0)