Implemented is_x86_feature_detected!(ermsb)

This commit is contained in:
Chase Wilson 2022-12-30 17:33:45 -06:00 committed by Amanieu d'Antras
parent a63313212b
commit 1f0116fea9
2 changed files with 5 additions and 0 deletions

View file

@ -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
}

View file

@ -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 {