Skip to content

Commit

Permalink
Rollup merge of rust-lang#90621 - adamgemmell:dev/stabilise-target-fe…
Browse files Browse the repository at this point in the history
…ature, r=Amanieu

Stabilise `aarch64_target_feature`

Draft stabilisation PR - rust-lang#90620
  • Loading branch information
matthiaskrgr authored Feb 19, 2022
2 parents e08d569 + 4e9bc91 commit 7e777df
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 52 deletions.
90 changes: 45 additions & 45 deletions compiler/rustc_codegen_ssa/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,95 +41,95 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[

const AARCH64_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
// FEAT_AdvSimd
("neon", Some(sym::aarch64_target_feature)),
("neon", None),
// FEAT_FP
("fp", Some(sym::aarch64_target_feature)),
("fp", None),
// FEAT_FP16
("fp16", Some(sym::aarch64_target_feature)),
("fp16", None),
// FEAT_SVE
("sve", Some(sym::aarch64_target_feature)),
("sve", None),
// FEAT_CRC
("crc", Some(sym::aarch64_target_feature)),
("crc", None),
// FEAT_RAS
("ras", Some(sym::aarch64_target_feature)),
("ras", None),
// FEAT_LSE
("lse", Some(sym::aarch64_target_feature)),
("lse", None),
// FEAT_RDM
("rdm", Some(sym::aarch64_target_feature)),
("rdm", None),
// FEAT_RCPC
("rcpc", Some(sym::aarch64_target_feature)),
("rcpc", None),
// FEAT_RCPC2
("rcpc2", Some(sym::aarch64_target_feature)),
("rcpc2", None),
// FEAT_DotProd
("dotprod", Some(sym::aarch64_target_feature)),
("dotprod", None),
// FEAT_TME
("tme", Some(sym::aarch64_target_feature)),
("tme", None),
// FEAT_FHM
("fhm", Some(sym::aarch64_target_feature)),
("fhm", None),
// FEAT_DIT
("dit", Some(sym::aarch64_target_feature)),
("dit", None),
// FEAT_FLAGM
("flagm", Some(sym::aarch64_target_feature)),
("flagm", None),
// FEAT_SSBS
("ssbs", Some(sym::aarch64_target_feature)),
("ssbs", None),
// FEAT_SB
("sb", Some(sym::aarch64_target_feature)),
("sb", None),
// FEAT_PAUTH (address authentication)
("paca", Some(sym::aarch64_target_feature)),
("paca", None),
// FEAT_PAUTH (generic authentication)
("pacg", Some(sym::aarch64_target_feature)),
("pacg", None),
// FEAT_DPB
("dpb", Some(sym::aarch64_target_feature)),
("dpb", None),
// FEAT_DPB2
("dpb2", Some(sym::aarch64_target_feature)),
("dpb2", None),
// FEAT_SVE2
("sve2", Some(sym::aarch64_target_feature)),
("sve2", None),
// FEAT_SVE2_AES
("sve2-aes", Some(sym::aarch64_target_feature)),
("sve2-aes", None),
// FEAT_SVE2_SM4
("sve2-sm4", Some(sym::aarch64_target_feature)),
("sve2-sm4", None),
// FEAT_SVE2_SHA3
("sve2-sha3", Some(sym::aarch64_target_feature)),
("sve2-sha3", None),
// FEAT_SVE2_BitPerm
("sve2-bitperm", Some(sym::aarch64_target_feature)),
("sve2-bitperm", None),
// FEAT_FRINTTS
("frintts", Some(sym::aarch64_target_feature)),
("frintts", None),
// FEAT_I8MM
("i8mm", Some(sym::aarch64_target_feature)),
("i8mm", None),
// FEAT_F32MM
("f32mm", Some(sym::aarch64_target_feature)),
("f32mm", None),
// FEAT_F64MM
("f64mm", Some(sym::aarch64_target_feature)),
("f64mm", None),
// FEAT_BF16
("bf16", Some(sym::aarch64_target_feature)),
("bf16", None),
// FEAT_RAND
("rand", Some(sym::aarch64_target_feature)),
("rand", None),
// FEAT_BTI
("bti", Some(sym::aarch64_target_feature)),
("bti", None),
// FEAT_MTE
("mte", Some(sym::aarch64_target_feature)),
("mte", None),
// FEAT_JSCVT
("jsconv", Some(sym::aarch64_target_feature)),
("jsconv", None),
// FEAT_FCMA
("fcma", Some(sym::aarch64_target_feature)),
("fcma", None),
// FEAT_AES
("aes", Some(sym::aarch64_target_feature)),
("aes", None),
// FEAT_SHA1 & FEAT_SHA256
("sha2", Some(sym::aarch64_target_feature)),
("sha2", None),
// FEAT_SHA512 & FEAT_SHA3
("sha3", Some(sym::aarch64_target_feature)),
("sha3", None),
// FEAT_SM3 & FEAT_SM4
("sm4", Some(sym::aarch64_target_feature)),
("sm4", None),
// FEAT_PAN
("pan", Some(sym::aarch64_target_feature)),
("pan", None),
// FEAT_LOR
("lor", Some(sym::aarch64_target_feature)),
("lor", None),
// FEAT_VHE
("vh", Some(sym::aarch64_target_feature)),
("vh", None),
// FEAT_PMUv3
("pmuv3", Some(sym::aarch64_target_feature)),
("pmuv3", None),
// FEAT_SPE
("spe", Some(sym::aarch64_target_feature)),
("spe", None),
("v8.1a", Some(sym::aarch64_target_feature)),
("v8.2a", Some(sym::aarch64_target_feature)),
("v8.3a", Some(sym::aarch64_target_feature)),
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ declare_features! (
// feature-group-start: accepted features
// -------------------------------------------------------------------------
/// Allows `#[target_feature(...)]` on aarch64 platforms
(accepted, aarch64_target_feature, "1.60.0", Some(44839), None),
/// Allows the sysV64 ABI to be specified on all platforms
/// instead of just the platforms on which it is the C ABI.
(accepted, abi_sysv64, "1.24.0", Some(36167), None),
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ declare_features! (
// FIXME: Document these and merge with the list below.
// Unstable `#[target_feature]` directives.
(active, aarch64_target_feature, "1.27.0", Some(44839), None),
(active, adx_target_feature, "1.32.0", Some(44839), None),
(active, arm_target_feature, "1.27.0", Some(44839), None),
(active, avx512_target_feature, "1.27.0", Some(44839), None),
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_typeck/src/collect.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-filelength
//! "Collection" is the process of determining the type and other external
//! details of each item in Rust. Collection is specifically concerned
//! with *inter-procedural* things -- for example, for a function
Expand Down Expand Up @@ -2692,7 +2691,6 @@ fn from_target_feature(
// Only allow features whose feature gates have been enabled.
let allowed = match feature_gate.as_ref().copied() {
Some(sym::arm_target_feature) => rust_features.arm_target_feature,
Some(sym::aarch64_target_feature) => rust_features.aarch64_target_feature,
Some(sym::hexagon_target_feature) => rust_features.hexagon_target_feature,
Some(sym::powerpc_target_feature) => rust_features.powerpc_target_feature,
Some(sym::mips_target_feature) => rust_features.mips_target_feature,
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
#![feature(asm_const)]
//
// Target features:
#![feature(aarch64_target_feature)]
#![cfg_attr(bootstrap, feature(aarch64_target_feature))]
#![feature(adx_target_feature)]
#![feature(arm_target_feature)]
#![feature(avx512_target_feature)]
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/target-feature/gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// gate-test-avx512_target_feature
// gate-test-tbm_target_feature
// gate-test-arm_target_feature
// gate-test-aarch64_target_feature
// gate-test-hexagon_target_feature
// gate-test-mips_target_feature
// gate-test-wasm_target_feature
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/target-feature/gate.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0658]: the target feature `avx512bw` is currently unstable
--> $DIR/gate.rs:32:18
--> $DIR/gate.rs:31:18
|
LL | #[target_feature(enable = "avx512bw")]
| ^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/target-feature/tied-features.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// only-aarch64
// build-fail

#![feature(aarch64_target_feature, target_feature_11)]
#![cfg_attr(bootstrap, feature(aarch64_target_feature))]

fn main() {
#[target_feature(enable = "pacg")]
Expand Down

0 comments on commit 7e777df

Please sign in to comment.