Skip to content

Commit 19a7201

Browse files
committed
Stabilize keylocker intrinsics and runtime detection
1 parent 9eb15e2 commit 19a7201

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

crates/core_arch/src/x86/kl.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ unsafe extern "unadjusted" {
127127
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_loadiwkey)
128128
#[inline]
129129
#[target_feature(enable = "kl")]
130-
#[unstable(feature = "keylocker_x86", issue = "134813")]
130+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
131131
#[cfg_attr(test, assert_instr(loadiwkey))]
132132
pub unsafe fn _mm_loadiwkey(
133133
control: u32,
@@ -153,7 +153,7 @@ pub unsafe fn _mm_loadiwkey(
153153
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_encodekey128_u32)
154154
#[inline]
155155
#[target_feature(enable = "kl")]
156-
#[unstable(feature = "keylocker_x86", issue = "134813")]
156+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
157157
#[cfg_attr(test, assert_instr(encodekey128))]
158158
pub unsafe fn _mm_encodekey128_u32(key_params: u32, key: __m128i, handle: *mut u8) -> u32 {
159159
let EncodeKey128Output(control, key0, key1, key2, _, _, _) = encodekey128(key_params, key);
@@ -176,7 +176,7 @@ pub unsafe fn _mm_encodekey128_u32(key_params: u32, key: __m128i, handle: *mut u
176176
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_encodekey256_u32)
177177
#[inline]
178178
#[target_feature(enable = "kl")]
179-
#[unstable(feature = "keylocker_x86", issue = "134813")]
179+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
180180
#[cfg_attr(test, assert_instr(encodekey256))]
181181
pub unsafe fn _mm_encodekey256_u32(
182182
key_params: u32,
@@ -198,7 +198,7 @@ pub unsafe fn _mm_encodekey256_u32(
198198
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_aesenc128kl_u8)
199199
#[inline]
200200
#[target_feature(enable = "kl")]
201-
#[unstable(feature = "keylocker_x86", issue = "134813")]
201+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
202202
#[cfg_attr(test, assert_instr(aesenc128kl))]
203203
pub unsafe fn _mm_aesenc128kl_u8(output: *mut __m128i, input: __m128i, handle: *const u8) -> u8 {
204204
let AesOutput(status, result) = aesenc128kl(input, handle);
@@ -214,7 +214,7 @@ pub unsafe fn _mm_aesenc128kl_u8(output: *mut __m128i, input: __m128i, handle: *
214214
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_aesdec128kl_u8)
215215
#[inline]
216216
#[target_feature(enable = "kl")]
217-
#[unstable(feature = "keylocker_x86", issue = "134813")]
217+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
218218
#[cfg_attr(test, assert_instr(aesdec128kl))]
219219
pub unsafe fn _mm_aesdec128kl_u8(output: *mut __m128i, input: __m128i, handle: *const u8) -> u8 {
220220
let AesOutput(status, result) = aesdec128kl(input, handle);
@@ -230,7 +230,7 @@ pub unsafe fn _mm_aesdec128kl_u8(output: *mut __m128i, input: __m128i, handle: *
230230
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_aesenc256kl_u8)
231231
#[inline]
232232
#[target_feature(enable = "kl")]
233-
#[unstable(feature = "keylocker_x86", issue = "134813")]
233+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
234234
#[cfg_attr(test, assert_instr(aesenc256kl))]
235235
pub unsafe fn _mm_aesenc256kl_u8(output: *mut __m128i, input: __m128i, handle: *const u8) -> u8 {
236236
let AesOutput(status, result) = aesenc256kl(input, handle);
@@ -246,7 +246,7 @@ pub unsafe fn _mm_aesenc256kl_u8(output: *mut __m128i, input: __m128i, handle: *
246246
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_aesdec256kl_u8)
247247
#[inline]
248248
#[target_feature(enable = "kl")]
249-
#[unstable(feature = "keylocker_x86", issue = "134813")]
249+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
250250
#[cfg_attr(test, assert_instr(aesdec256kl))]
251251
pub unsafe fn _mm_aesdec256kl_u8(output: *mut __m128i, input: __m128i, handle: *const u8) -> u8 {
252252
let AesOutput(status, result) = aesdec256kl(input, handle);
@@ -262,7 +262,7 @@ pub unsafe fn _mm_aesdec256kl_u8(output: *mut __m128i, input: __m128i, handle: *
262262
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_aesencwide128kl_u8)
263263
#[inline]
264264
#[target_feature(enable = "widekl")]
265-
#[unstable(feature = "keylocker_x86", issue = "134813")]
265+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
266266
#[cfg_attr(test, assert_instr(aesencwide128kl))]
267267
pub unsafe fn _mm_aesencwide128kl_u8(
268268
output: *mut __m128i,
@@ -285,7 +285,7 @@ pub unsafe fn _mm_aesencwide128kl_u8(
285285
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_aesdecwide128kl_u8)
286286
#[inline]
287287
#[target_feature(enable = "widekl")]
288-
#[unstable(feature = "keylocker_x86", issue = "134813")]
288+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
289289
#[cfg_attr(test, assert_instr(aesdecwide128kl))]
290290
pub unsafe fn _mm_aesdecwide128kl_u8(
291291
output: *mut __m128i,
@@ -308,7 +308,7 @@ pub unsafe fn _mm_aesdecwide128kl_u8(
308308
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_aesencwide256kl_u8)
309309
#[inline]
310310
#[target_feature(enable = "widekl")]
311-
#[unstable(feature = "keylocker_x86", issue = "134813")]
311+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
312312
#[cfg_attr(test, assert_instr(aesencwide256kl))]
313313
pub unsafe fn _mm_aesencwide256kl_u8(
314314
output: *mut __m128i,
@@ -331,7 +331,7 @@ pub unsafe fn _mm_aesencwide256kl_u8(
331331
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_aesdecwide256kl_u8)
332332
#[inline]
333333
#[target_feature(enable = "widekl")]
334-
#[unstable(feature = "keylocker_x86", issue = "134813")]
334+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
335335
#[cfg_attr(test, assert_instr(aesdecwide256kl))]
336336
pub unsafe fn _mm_aesdecwide256kl_u8(
337337
output: *mut __m128i,

crates/core_arch/src/x86/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,5 +772,5 @@ mod avx512fp16;
772772
pub use self::avx512fp16::*;
773773

774774
mod kl;
775-
#[unstable(feature = "keylocker_x86", issue = "134813")]
775+
#[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")]
776776
pub use self::kl::*;

crates/std_detect/src/detect/arch/x86.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ features! {
264264
/// XSAVEC (Save Processor Extended States Compacted)
265265
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] cmpxchg16b: "cmpxchg16b";
266266
/// CMPXCH16B (16-byte compare-and-swap instruction)
267-
@FEATURE: #[unstable(feature = "keylocker_x86", issue = "134813")] kl: "kl";
267+
@FEATURE: #[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")] kl: "kl";
268268
/// Intel Key Locker
269-
@FEATURE: #[unstable(feature = "keylocker_x86", issue = "134813")] widekl: "widekl";
269+
@FEATURE: #[stable(feature = "keylocker_x86", since = "CURRENT_RUSTC_VERSION")] widekl: "widekl";
270270
/// Intel Key Locker Wide
271271
@FEATURE: #[stable(feature = "simd_x86_adx", since = "1.33.0")] adx: "adx";
272272
/// ADX, Intel ADX (Multi-Precision Add-Carry Instruction Extensions)

0 commit comments

Comments
 (0)