diff options
| author | Chase Wilson <me@chasewilson.dev> | 2022-12-30 17:33:45 -0600 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2023-03-12 20:20:06 +0100 |
| commit | 1f0116fea95d42ec02a1927c69aabc7305969dcf (patch) | |
| tree | 2e3847e173409ee983bdb8ebc31549c10e7d6ff6 /library/stdarch/crates/std_detect | |
| parent | a63313212be536c71adcb07530ea66ef3b27a299 (diff) | |
| download | rust-1f0116fea95d42ec02a1927c69aabc7305969dcf.tar.gz rust-1f0116fea95d42ec02a1927c69aabc7305969dcf.zip | |
Implemented is_x86_feature_detected!(ermsb)
Diffstat (limited to 'library/stdarch/crates/std_detect')
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/arch/x86.rs | 3 | ||||
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/os/x86.rs | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/arch/x86.rs b/library/stdarch/crates/std_detect/src/detect/arch/x86.rs index 7e0af21a223..828ac5c38a2 100644 --- a/library/stdarch/crates/std_detect/src/detect/arch/x86.rs +++ b/library/stdarch/crates/std_detect/src/detect/arch/x86.rs @@ -92,6 +92,7 @@ features! { /// * `"adx"` /// * `"rtm"` /// * `"movbe"` + /// * `"ermsb"` /// /// [docs]: https://software.intel.com/sites/landingpage/IntrinsicsGuide #[stable(feature = "simd_x86", since = "1.27.0")] @@ -200,4 +201,6 @@ features! { /// RTM, Intel (Restricted Transactional Memory) @FEATURE: #[stable(feature = "movbe_target_feature", since = "1.67.0")] movbe: "movbe"; /// MOVBE (Move Data After Swapping Bytes) + @FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] ermsb: "ermsb"; + /// ERMSB, Enhanced REP MOVSB and STOSB } diff --git a/library/stdarch/crates/std_detect/src/detect/os/x86.rs b/library/stdarch/crates/std_detect/src/detect/os/x86.rs index 46cde892195..d8afc1aca4f 100644 --- a/library/stdarch/crates/std_detect/src/detect/os/x86.rs +++ b/library/stdarch/crates/std_detect/src/detect/os/x86.rs @@ -129,6 +129,8 @@ pub(crate) fn detect_features() -> cache::Initializer { enable(extended_features_ebx, 3, Feature::bmi1); enable(extended_features_ebx, 8, Feature::bmi2); + enable(extended_features_ebx, 9, Feature::ermsb); + // `XSAVE` and `AVX` support: let cpu_xsave = bit::test(proc_info_ecx as usize, 26); if cpu_xsave { |
