We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
kl
widekl
1 parent 56f9e6f commit dc49fddCopy full SHA for dc49fdd
compiler/rustc_feature/src/unstable.rs
@@ -525,6 +525,8 @@ declare_features! (
525
(unstable, inline_const_pat, "1.58.0", Some(76001)),
526
/// Allows using `pointer` and `reference` in intra-doc links
527
(unstable, intra_doc_pointers, "1.51.0", Some(80896)),
528
+ // Allows using the `kl` and `widekl` target features and the associated intrinsics
529
+ (unstable, keylocker_x86, "CURRENT_RUSTC_VERSION", Some(134813)),
530
// Allows setting the threshold for the `large_assignments` lint.
531
(unstable, large_assignments, "1.52.0", Some(83518)),
532
/// Allow to have type alias types for inter-crate use.
compiler/rustc_span/src/symbol.rs
@@ -1149,6 +1149,7 @@ symbols! {
1149
iterator,
1150
iterator_collect_fn,
1151
kcfi,
1152
+ keylocker_x86,
1153
keyword,
1154
kind,
1155
kreg,
compiler/rustc_target/src/target_features.rs
@@ -401,6 +401,7 @@ const X86_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
401
("fma", Stable, &["avx"]),
402
("fxsr", Stable, &[]),
403
("gfni", Unstable(sym::avx512_target_feature), &["sse2"]),
404
+ ("kl", Unstable(sym::keylocker_x86), &["sse2"]),
405
("lahfsahf", Unstable(sym::lahfsahf_target_feature), &[]),
406
("lzcnt", Stable, &[]),
407
("movbe", Stable, &[]),
@@ -425,6 +426,7 @@ const X86_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
425
426
("tbm", Unstable(sym::tbm_target_feature), &[]),
427
("vaes", Unstable(sym::avx512_target_feature), &["avx2", "aes"]),
428
("vpclmulqdq", Unstable(sym::avx512_target_feature), &["avx", "pclmulqdq"]),
429
+ ("widekl", Unstable(sym::keylocker_x86), &["kl"]),
430
("x87", Unstable(sym::x87_target_feature), &[]),
431
("xop", Unstable(sym::xop_target_feature), &[/*"fma4", */ "avx", "sse4a"]),
432
("xsave", Stable, &[]),
tests/ui/check-cfg/target_feature.stderr
@@ -127,6 +127,7 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE");
127
`isa-68881`
128
`isa-68882`
129
`jsconv`
130
+`kl`
131
`lahfsahf`
132
`lasx`
133
`lbt`
@@ -270,6 +271,7 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE");
270
271
`vsx`
272
`wfxt`
273
`wide-arithmetic`
274
+`widekl`
275
`x87`
276
`xop`
277
`xsave`
tests/ui/feature-gates/feature-gate-keylocker_x86.rs
@@ -0,0 +1,6 @@
1
+//@ only-x86_64
2
+#[target_feature(enable = "kl")]
3
+//~^ ERROR: currently unstable
4
+unsafe fn foo() {}
5
+
6
+fn main() {}
tests/ui/feature-gates/feature-gate-keylocker_x86.stderr
@@ -0,0 +1,13 @@
+error[E0658]: the target feature `kl` is currently unstable
+ --> $DIR/feature-gate-keylocker_x86.rs:2:18
+ |
+LL | #[target_feature(enable = "kl")]
+ | ^^^^^^^^^^^^^
7
+ = note: see issue #134813 <https://github.com/rust-lang/rust/issues/134813> for more information
8
+ = help: add `#![feature(keylocker_x86)]` to the crate attributes to enable
9
+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10
11
+error: aborting due to 1 previous error
12
13
+For more information about this error, try `rustc --explain E0658`.
0 commit comments