mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Add kl and widekl target features, and the feature gate
This commit is contained in:
committed by
sayantn
parent
56f9e6f935
commit
dc49fdd225
@@ -525,6 +525,8 @@ pub fn internal(&self, feature: Symbol) -> bool {
|
||||
(unstable, inline_const_pat, "1.58.0", Some(76001)),
|
||||
/// Allows using `pointer` and `reference` in intra-doc links
|
||||
(unstable, intra_doc_pointers, "1.51.0", Some(80896)),
|
||||
// Allows using the `kl` and `widekl` target features and the associated intrinsics
|
||||
(unstable, keylocker_x86, "CURRENT_RUSTC_VERSION", Some(134813)),
|
||||
// Allows setting the threshold for the `large_assignments` lint.
|
||||
(unstable, large_assignments, "1.52.0", Some(83518)),
|
||||
/// Allow to have type alias types for inter-crate use.
|
||||
|
||||
@@ -1149,6 +1149,7 @@
|
||||
iterator,
|
||||
iterator_collect_fn,
|
||||
kcfi,
|
||||
keylocker_x86,
|
||||
keyword,
|
||||
kind,
|
||||
kreg,
|
||||
|
||||
@@ -401,6 +401,7 @@ pub fn toggle_allowed(&self) -> Result<(), &'static str> {
|
||||
("fma", Stable, &["avx"]),
|
||||
("fxsr", Stable, &[]),
|
||||
("gfni", Unstable(sym::avx512_target_feature), &["sse2"]),
|
||||
("kl", Unstable(sym::keylocker_x86), &["sse2"]),
|
||||
("lahfsahf", Unstable(sym::lahfsahf_target_feature), &[]),
|
||||
("lzcnt", Stable, &[]),
|
||||
("movbe", Stable, &[]),
|
||||
@@ -425,6 +426,7 @@ pub fn toggle_allowed(&self) -> Result<(), &'static str> {
|
||||
("tbm", Unstable(sym::tbm_target_feature), &[]),
|
||||
("vaes", Unstable(sym::avx512_target_feature), &["avx2", "aes"]),
|
||||
("vpclmulqdq", Unstable(sym::avx512_target_feature), &["avx", "pclmulqdq"]),
|
||||
("widekl", Unstable(sym::keylocker_x86), &["kl"]),
|
||||
("x87", Unstable(sym::x87_target_feature), &[]),
|
||||
("xop", Unstable(sym::xop_target_feature), &[/*"fma4", */ "avx", "sse4a"]),
|
||||
("xsave", Stable, &[]),
|
||||
|
||||
@@ -127,6 +127,7 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE");
|
||||
`isa-68881`
|
||||
`isa-68882`
|
||||
`jsconv`
|
||||
`kl`
|
||||
`lahfsahf`
|
||||
`lasx`
|
||||
`lbt`
|
||||
@@ -270,6 +271,7 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE");
|
||||
`vsx`
|
||||
`wfxt`
|
||||
`wide-arithmetic`
|
||||
`widekl`
|
||||
`x87`
|
||||
`xop`
|
||||
`xsave`
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
//@ only-x86_64
|
||||
#[target_feature(enable = "kl")]
|
||||
//~^ ERROR: currently unstable
|
||||
unsafe fn foo() {}
|
||||
|
||||
fn main() {}
|
||||
@@ -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")]
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #134813 <https://github.com/rust-lang/rust/issues/134813> for more information
|
||||
= help: add `#![feature(keylocker_x86)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
Reference in New Issue
Block a user