Skip to content

Commit

Permalink
Auto merge of rust-lang#106774 - Nugine:master, r=Amanieu
Browse files Browse the repository at this point in the history
Stabilize cmpxchg16b_target_feature

Tracking issue for target features
+ rust-lang#44839

stdarch issue
+ rust-lang/stdarch#827

stdarch PR
+ rust-lang/stdarch#1358

reference PR
+ rust-lang/reference#1331

It's my first time contributing to rust-lang/rust. Please tell me if I missed something.
  • Loading branch information
bors committed Feb 28, 2023
2 parents b583ede + a4f2d14 commit fd1f1fa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_codegen_ssa/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const X86_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
("avx512vpopcntdq", Some(sym::avx512_target_feature)),
("bmi1", None),
("bmi2", None),
("cmpxchg16b", Some(sym::cmpxchg16b_target_feature)),
("cmpxchg16b", None),
("ermsb", Some(sym::ermsb_target_feature)),
("f16c", None),
("fma", None),
Expand Down Expand Up @@ -394,7 +394,6 @@ pub fn from_target_feature(
Some(sym::sse4a_target_feature) => rust_features.sse4a_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::movbe_target_feature) => rust_features.movbe_target_feature,
Some(sym::rtm_target_feature) => rust_features.rtm_target_feature,
Some(sym::ermsb_target_feature) => rust_features.ermsb_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 @@ -90,6 +90,8 @@ declare_features! (
(accepted, clone_closures, "1.26.0", Some(44490), None),
/// Allows coercing non capturing closures to function pointers.
(accepted, closure_to_fn_coercion, "1.19.0", Some(39817), None),
/// Allows using `cmpxchg16b` from `core::arch::x86_64`.
(accepted, cmpxchg16b_target_feature, "CURRENT_RUSTC_VERSION", Some(44839), None),
/// Allows usage of the `compile_error!` macro.
(accepted, compile_error, "1.20.0", Some(40872), None),
/// Allows `impl Trait` in function return types.
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 @@ -256,7 +256,6 @@ declare_features! (
(active, arm_target_feature, "1.27.0", Some(44839), None),
(active, avx512_target_feature, "1.27.0", Some(44839), None),
(active, bpf_target_feature, "1.54.0", Some(44839), None),
(active, cmpxchg16b_target_feature, "1.32.0", Some(44839), None),
(active, ermsb_target_feature, "1.49.0", Some(44839), None),
(active, hexagon_target_feature, "1.27.0", Some(44839), None),
(active, mips_target_feature, "1.27.0", Some(44839), None),
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 @@ -244,7 +244,6 @@
// Target features:
#![feature(arm_target_feature)]
#![feature(avx512_target_feature)]
#![feature(cmpxchg16b_target_feature)]
#![feature(hexagon_target_feature)]
#![feature(mips_target_feature)]
#![feature(powerpc_target_feature)]
Expand All @@ -253,6 +252,7 @@
#![feature(sse4a_target_feature)]
#![feature(tbm_target_feature)]
#![feature(wasm_target_feature)]
#![cfg_attr(bootstrap, feature(cmpxchg16b_target_feature))]

// allow using `core::` in intra-doc links
#[allow(unused_extern_crates)]
Expand Down

0 comments on commit fd1f1fa

Please sign in to comment.