Skip to content

Commit 08e1018

Browse files
authored
Rollup merge of rust-lang#144542 - sayantn:stabilize-sse4a-tbm, r=Amanieu,traviscross
Stabilize `sse4a` and `tbm` target features This PR stabilizes the feature flag `sse4a_target_feature` and `tbm_target_feature` (tracking issue rust-lang#44839). # Public API The 2 `x86` target features `sse4a` and `tbm` Also, these were added in LLVM2.6 and LLVM3.4-rc1, respectively, and as the minimum LLVM required for rustc is LLVM19, we are safe in that front too! As all of the required tasks have been done (adding the target features to rustc, implementing their runtime detection in std_detect and implementing the associated intrinsics in core_arch), these target features can be stabilized now. The intrinsics were stabilized *long* ago, in 1.27.0 Reference PR: - rust-lang/reference#1949 cc ```@rust-lang/lang``` ```@rustbot``` label I-lang-nominated r? lang
2 parents 1f298a2 + 3200d1f commit 08e1018

File tree

6 files changed

+6
-14
lines changed

6 files changed

+6
-14
lines changed

compiler/rustc_feature/src/accepted.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ declare_features! (
396396
(accepted, slice_patterns, "1.42.0", Some(62254)),
397397
/// Allows use of `&foo[a..b]` as a slicing syntax.
398398
(accepted, slicing_syntax, "1.0.0", None),
399+
/// Allows use of `sse4a` target feature.
400+
(accepted, sse4a_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
399401
/// Allows elision of `'static` lifetimes in `static`s and `const`s.
400402
(accepted, static_in_const, "1.17.0", Some(35897)),
401403
/// Allows the definition recursive static items.
@@ -408,6 +410,8 @@ declare_features! (
408410
(accepted, target_feature, "1.27.0", None),
409411
/// Allows the use of `#[target_feature]` on safe functions.
410412
(accepted, target_feature_11, "1.86.0", Some(69098)),
413+
/// Allows use of `tbm` target feature.
414+
(accepted, tbm_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
411415
/// Allows `fn main()` with return types which implements `Termination` (RFC 1937).
412416
(accepted, termination_trait, "1.26.0", Some(43301)),
413417
/// Allows `#[test]` functions where the return type implements `Termination` (RFC 1937).

compiler/rustc_feature/src/unstable.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,6 @@ declare_features! (
334334
(unstable, rtm_target_feature, "1.35.0", Some(44839)),
335335
(unstable, s390x_target_feature, "1.82.0", Some(44839)),
336336
(unstable, sparc_target_feature, "1.84.0", Some(132783)),
337-
(unstable, sse4a_target_feature, "1.27.0", Some(44839)),
338-
(unstable, tbm_target_feature, "1.27.0", Some(44839)),
339337
(unstable, wasm_target_feature, "1.30.0", Some(44839)),
340338
(unstable, x87_target_feature, "1.85.0", Some(44839)),
341339
// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!

compiler/rustc_target/src/target_features.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,9 @@ static X86_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
471471
("sse3", Stable, &["sse2"]),
472472
("sse4.1", Stable, &["ssse3"]),
473473
("sse4.2", Stable, &["sse4.1"]),
474-
("sse4a", Unstable(sym::sse4a_target_feature), &["sse3"]),
474+
("sse4a", Stable, &["sse3"]),
475475
("ssse3", Stable, &["sse3"]),
476-
("tbm", Unstable(sym::tbm_target_feature), &[]),
476+
("tbm", Stable, &[]),
477477
("vaes", Stable, &["avx2", "aes"]),
478478
("vpclmulqdq", Stable, &["avx", "pclmulqdq"]),
479479
("widekl", Stable, &["kl"]),

library/core/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,6 @@
200200
#![feature(riscv_target_feature)]
201201
#![feature(rtm_target_feature)]
202202
#![feature(s390x_target_feature)]
203-
#![feature(sse4a_target_feature)]
204-
#![feature(tbm_target_feature)]
205203
#![feature(wasm_target_feature)]
206204
#![feature(x86_amx_intrinsics)]
207205
// tidy-alphabetical-end

library/stdarch/crates/core_arch/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
rustc_attrs,
1919
staged_api,
2020
doc_cfg,
21-
tbm_target_feature,
22-
sse4a_target_feature,
2321
riscv_target_feature,
2422
arm_target_feature,
2523
mips_target_feature,

tests/ui/target-feature/gate.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
//@ only-x86_64
22
//
3-
// gate-test-sse4a_target_feature
43
// gate-test-powerpc_target_feature
5-
// gate-test-tbm_target_feature
64
// gate-test-arm_target_feature
75
// gate-test-hexagon_target_feature
86
// gate-test-mips_target_feature
97
// gate-test-nvptx_target_feature
108
// gate-test-wasm_target_feature
11-
// gate-test-adx_target_feature
12-
// gate-test-cmpxchg16b_target_feature
13-
// gate-test-movbe_target_feature
149
// gate-test-rtm_target_feature
15-
// gate-test-f16c_target_feature
1610
// gate-test-riscv_target_feature
1711
// gate-test-ermsb_target_feature
1812
// gate-test-bpf_target_feature

0 commit comments

Comments
 (0)