diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index f37c6751381774d812c584f64182ce4c45a9c6f7..5056ec1d3852acb0dcfb5e7707c81aac98120bdf 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -148,7 +148,7 @@ ]; const X86_ALLOWED_FEATURES: &[(&str, Option)] = &[ - ("adx", Some(sym::adx_target_feature)), + ("adx", None), ("aes", None), ("avx", None), ("avx2", None), diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index e49f40ff1a1845524110d27953a89db30443a768..ace0c9df58d50e1dc06d5b8f3bb8924db091e721 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -51,6 +51,8 @@ /// 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), + /// Allows using ADX intrinsics from `core::arch::{x86, x86_64}`. + (accepted, adx_target_feature, "1.61.0", Some(44839), None), /// Allows the definition of associated constants in `trait` or `impl` blocks. (accepted, associated_consts, "1.20.0", Some(29646), None), /// Allows using associated `type`s in `trait`s. diff --git a/compiler/rustc_typeck/src/collect.rs b/compiler/rustc_typeck/src/collect.rs index 16e72d0c2c565985afdf556058a7ee2ec395e24c..6a4c5d4a6c7ea34d168d5b2d2f680b552537c965 100644 --- a/compiler/rustc_typeck/src/collect.rs +++ b/compiler/rustc_typeck/src/collect.rs @@ -2689,7 +2689,6 @@ fn from_target_feature( Some(sym::tbm_target_feature) => rust_features.tbm_target_feature, Some(sym::wasm_target_feature) => rust_features.wasm_target_feature, Some(sym::cmpxchg16b_target_feature) => rust_features.cmpxchg16b_target_feature, - Some(sym::adx_target_feature) => rust_features.adx_target_feature, Some(sym::movbe_target_feature) => rust_features.movbe_target_feature, Some(sym::rtm_target_feature) => rust_features.rtm_target_feature, Some(sym::f16c_target_feature) => rust_features.f16c_target_feature, diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index e1be20c217911f615ab77ab028ed6ab75bf537c4..0860e1bf4ca92ae0d0fa16817c145953eece6787 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -207,7 +207,6 @@ // // Target features: #![cfg_attr(bootstrap, feature(aarch64_target_feature))] -#![feature(adx_target_feature)] #![feature(arm_target_feature)] #![feature(avx512_target_feature)] #![feature(cmpxchg16b_target_feature)] @@ -219,6 +218,7 @@ #![feature(sse4a_target_feature)] #![feature(tbm_target_feature)] #![feature(wasm_target_feature)] +#![cfg_attr(bootstrap, feature(adx_target_feature))] // allow using `core::` in intra-doc links #[allow(unused_extern_crates)]