add newly-added s390x features to is_s390x_feature_detected

This commit is contained in:
Folkert de Vries 2025-02-22 14:26:49 +01:00 committed by Amanieu d'Antras
parent 3ac35a7333
commit 67468b20ff
2 changed files with 70 additions and 0 deletions

View file

@ -7,6 +7,39 @@ features! {
@MACRO_ATTRS:
/// Checks if `s390x` feature is enabled.
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] deflate_conversion: "deflate-conversion";
/// s390x deflate-conversion facility
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] enhanced_sort: "enhanced-sort";
/// s390x enhanced-sort facility
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] guarded_storage: "guarded-storage";
/// s390x guarded-storage facility
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] high_word: "high-word";
/// s390x high-word facility
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] nnp_assist: "nnp-assist";
/// s390x nnp-assist facility
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] transactional_execution: "transactional-execution";
/// s390x transactional-execution facility
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] vector: "vector";
/// s390x vector facility
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] vector_enhancements_1: "vector-enhancements-1";
/// s390x vector-enhancements-1 facility
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] vector_enhancements_2: "vector-enhancements-2";
/// s390x vector-enhancements-2 facility
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] vector_packed_decimal: "vector-packed-decimal";
/// s390x vector-packed-decimal facility
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] vector_packed_decimal_enhancement: "vector-packed-decimal-enhancement";
/// s390x vector-packed-decimal-enhancement facility
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
@FEATURE: #[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")] vector_packed_decimal_enhancement_2: "vector-packed-decimal-enhancement-2";
/// s390x vector-packed-decimal-enhancement-2 facility
}

View file

@ -87,8 +87,45 @@ impl AtHwcap {
}
};
// vector and related
// bit 129 of the extended facility list
enable_feature(Feature::vector, self.vxrs);
// bit 135 of the extended facility list
enable_feature(Feature::vector_enhancements_1, self.vxrs_ext);
// bit 148 of the extended facility list
enable_feature(Feature::vector_enhancements_2, self.vxrs_ext2);
// bit 134 of the extended facility list
enable_feature(Feature::vector_packed_decimal, self.vxrs_bcd);
// bit 152 of the extended facility list
enable_feature(Feature::vector_packed_decimal_enhancement, self.vxrs_pde);
// bit 192 of the extended facility list
enable_feature(Feature::vector_packed_decimal_enhancement_2, self.vxrs_pde2);
// bit 165 of the extended facility list
enable_feature(Feature::nnp_assist, self.nnpa);
// others
// bit 45 of the extended facility list
enable_feature(Feature::high_word, self.high_gprs);
// bit 73 of the extended facility list
enable_feature(Feature::transactional_execution, self.te);
// bit 133 of the extended facility list
enable_feature(Feature::guarded_storage, self.gs);
// bit 150 of the extended facility list
enable_feature(Feature::enhanced_sort, self.sort);
// bit 151 of the extended facility list
enable_feature(Feature::deflate_conversion, self.dflt);
}
value
}