Skip to content

Commit 5ce8d3a

Browse files
committed
Stabilize all remaining x86 features for feature detection
1 parent b00ecbe commit 5ce8d3a

File tree

1 file changed

+29
-19
lines changed
  • crates/std_detect/src/detect/arch

1 file changed

+29
-19
lines changed

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

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ features! {
6666
/// * `"avx512ifma"`
6767
/// * `"avx512vbmi"`
6868
/// * `"avx512vpopcntdq"`
69+
/// * `"avx512vbmi2"`
70+
/// * `"avx512gfni"`
71+
/// * `"avx512vaes"`
72+
/// * `"avx512vpclmulqdq"`
73+
/// * `"avx512vnni"`
74+
/// * `"avx512bitalg"`
75+
/// * `"avx512bf16"`
76+
/// * `"avx512vp2intersect"`
77+
/// * `"f16c"`
6978
/// * `"fma"`
7079
/// * `"bmi1"`
7180
/// * `"bmi2"`
@@ -78,6 +87,9 @@ features! {
7887
/// * `"xsaveopt"`
7988
/// * `"xsaves"`
8089
/// * `"xsavec"`
90+
/// * `"cmpxchg16b"`
91+
/// * `"adx"`
92+
/// * `"rtm"`
8193
///
8294
/// [docs]: https://software.intel.com/sites/landingpage/IntrinsicsGuide
8395
#[stable(feature = "simd_x86", since = "1.27.0")]
@@ -86,7 +98,7 @@ features! {
8698
/// AES (Advanced Encryption Standard New Instructions AES-NI)
8799
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] pclmulqdq: "pclmulqdq";
88100
/// CLMUL (Carry-less Multiplication)
89-
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] rdrand: "rdrand";
101+
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] rdrand: "rdrand";
90102
/// RDRAND
91103
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] rdseed: "rdseed";
92104
/// RDSEED
@@ -114,10 +126,6 @@ features! {
114126
/// AVX (Advanced Vector Extensions)
115127
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] avx2: "avx2";
116128
/// AVX2 (Advanced Vector Extensions 2)
117-
// Detection for the AVX-512 features below was accidentally stabilized in
118-
// Rust 1.27.0, even though the corresponding intrinsics are still unstable
119-
// or unimplemeted. There are stable callers who rely on detection support,
120-
// e.g. to call AVX-512 C code via FFI.
121129
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] avx512f: "avx512f" ;
122130
/// AVX-512 F (Foundation)
123131
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] avx512cd: "avx512cd" ;
@@ -132,30 +140,32 @@ features! {
132140
/// AVX-512 DQ (Doubleword and Quadword)
133141
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] avx512vl: "avx512vl";
134142
/// AVX-512 VL (Vector Length Extensions)
135-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512ifma: "avx512ifma";
143+
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] avx512ifma: "avx512ifma";
136144
/// AVX-512 IFMA (Integer Fused Multiply Add)
137-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vbmi: "avx512vbmi";
145+
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] avx512vbmi: "avx512vbmi";
138146
/// AVX-512 VBMI (Vector Byte Manipulation Instructions)
139-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vpopcntdq: "avx512vpopcntdq";
147+
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] avx512vpopcntdq: "avx512vpopcntdq";
140148
/// AVX-512 VPOPCNTDQ (Vector Population Count Doubleword and
141149
/// Quadword)
142-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vbmi2: "avx512vbmi2";
150+
@FEATURE: #[stable(feature = "simd_x86", since = "1.43.0")] avx512vbmi2: "avx512vbmi2";
143151
/// AVX-512 VBMI2 (Additional byte, word, dword and qword capabilities)
144-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512gfni: "avx512gfni";
152+
@FEATURE: #[stable(feature = "simd_x86", since = "1.43.0")] avx512gfni: "avx512gfni";
145153
/// AVX-512 GFNI (Galois Field New Instruction)
146-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vaes: "avx512vaes";
154+
@FEATURE: #[stable(feature = "simd_x86", since = "1.43.0")] avx512vaes: "avx512vaes";
147155
/// AVX-512 VAES (Vector AES instruction)
148-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vpclmulqdq: "avx512vpclmulqdq";
156+
@FEATURE: #[stable(feature = "simd_x86", since = "1.43.0")]
157+
avx512vpclmulqdq: "avx512vpclmulqdq";
149158
/// AVX-512 VPCLMULQDQ (Vector PCLMULQDQ instructions)
150-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vnni: "avx512vnni";
159+
@FEATURE: #[stable(feature = "simd_x86", since = "1.43.0")] avx512vnni: "avx512vnni";
151160
/// AVX-512 VNNI (Vector Neural Network Instructions)
152-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512bitalg: "avx512bitalg";
161+
@FEATURE: #[stable(feature = "simd_x86", since = "1.43.0")] avx512bitalg: "avx512bitalg";
153162
/// AVX-512 BITALG (Support for VPOPCNT[B,W] and VPSHUFBITQMB)
154-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512bf16: "avx512bf16";
163+
@FEATURE: #[stable(feature = "simd_x86", since = "1.43.0")] avx512bf16: "avx512bf16";
155164
/// AVX-512 BF16 (BFLOAT16 instructions)
156-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vp2intersect: "avx512vp2intersect";
165+
@FEATURE: #[stable(feature = "simd_x86", since = "1.43.0")]
166+
avx512vp2intersect: "avx512vp2intersect";
157167
/// AVX-512 P2INTERSECT
158-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] f16c: "f16c";
168+
@FEATURE: #[stable(feature = "simd_x86", since = "1.43.0")] f16c: "f16c";
159169
/// F16C (Conversions between IEEE-754 `binary16` and `binary32` formats)
160170
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] fma: "fma";
161171
/// FMA (Fused Multiply Add)
@@ -179,10 +189,10 @@ features! {
179189
/// XSAVES (Save Processor Extended States Supervisor)
180190
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] xsavec: "xsavec";
181191
/// XSAVEC (Save Processor Extended States Compacted)
182-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] cmpxchg16b: "cmpxchg16b";
192+
@FEATURE: #[stable(feature = "simd_x86", since = "1.43.0")] cmpxchg16b: "cmpxchg16b";
183193
/// CMPXCH16B (16-byte compare-and-swap instruction)
184194
@FEATURE: #[stable(feature = "simd_x86_adx", since = "1.33.0")] adx: "adx";
185195
/// ADX, Intel ADX (Multi-Precision Add-Carry Instruction Extensions)
186-
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] rtm: "rtm";
196+
@FEATURE: #[stable(feature = "simd_x86", since = "1.43.0")] rtm: "rtm";
187197
/// RTM, Intel (Restricted Transactional Memory)
188198
}

0 commit comments

Comments
 (0)