Skip to content

Commit fd1f1fa

Browse files
committed
Auto merge of #106774 - Nugine:master, r=Amanieu
Stabilize cmpxchg16b_target_feature Tracking issue for target features + #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.
2 parents b583ede + a4f2d14 commit fd1f1fa

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

compiler/rustc_codegen_ssa/src/target_features.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ const X86_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
185185
("avx512vpopcntdq", Some(sym::avx512_target_feature)),
186186
("bmi1", None),
187187
("bmi2", None),
188-
("cmpxchg16b", Some(sym::cmpxchg16b_target_feature)),
188+
("cmpxchg16b", None),
189189
("ermsb", Some(sym::ermsb_target_feature)),
190190
("f16c", None),
191191
("fma", None),
@@ -394,7 +394,6 @@ pub fn from_target_feature(
394394
Some(sym::sse4a_target_feature) => rust_features.sse4a_target_feature,
395395
Some(sym::tbm_target_feature) => rust_features.tbm_target_feature,
396396
Some(sym::wasm_target_feature) => rust_features.wasm_target_feature,
397-
Some(sym::cmpxchg16b_target_feature) => rust_features.cmpxchg16b_target_feature,
398397
Some(sym::movbe_target_feature) => rust_features.movbe_target_feature,
399398
Some(sym::rtm_target_feature) => rust_features.rtm_target_feature,
400399
Some(sym::ermsb_target_feature) => rust_features.ermsb_target_feature,

compiler/rustc_feature/src/accepted.rs

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ declare_features! (
9090
(accepted, clone_closures, "1.26.0", Some(44490), None),
9191
/// Allows coercing non capturing closures to function pointers.
9292
(accepted, closure_to_fn_coercion, "1.19.0", Some(39817), None),
93+
/// Allows using `cmpxchg16b` from `core::arch::x86_64`.
94+
(accepted, cmpxchg16b_target_feature, "CURRENT_RUSTC_VERSION", Some(44839), None),
9395
/// Allows usage of the `compile_error!` macro.
9496
(accepted, compile_error, "1.20.0", Some(40872), None),
9597
/// Allows `impl Trait` in function return types.

compiler/rustc_feature/src/active.rs

-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ declare_features! (
256256
(active, arm_target_feature, "1.27.0", Some(44839), None),
257257
(active, avx512_target_feature, "1.27.0", Some(44839), None),
258258
(active, bpf_target_feature, "1.54.0", Some(44839), None),
259-
(active, cmpxchg16b_target_feature, "1.32.0", Some(44839), None),
260259
(active, ermsb_target_feature, "1.49.0", Some(44839), None),
261260
(active, hexagon_target_feature, "1.27.0", Some(44839), None),
262261
(active, mips_target_feature, "1.27.0", Some(44839), None),

library/core/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@
244244
// Target features:
245245
#![feature(arm_target_feature)]
246246
#![feature(avx512_target_feature)]
247-
#![feature(cmpxchg16b_target_feature)]
248247
#![feature(hexagon_target_feature)]
249248
#![feature(mips_target_feature)]
250249
#![feature(powerpc_target_feature)]
@@ -253,6 +252,7 @@
253252
#![feature(sse4a_target_feature)]
254253
#![feature(tbm_target_feature)]
255254
#![feature(wasm_target_feature)]
255+
#![cfg_attr(bootstrap, feature(cmpxchg16b_target_feature))]
256256

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

0 commit comments

Comments
 (0)