diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2025-02-22 14:26:49 +0100 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2025-02-23 23:53:36 +0000 |
| commit | 67468b20ff1355962089243abcd1f3fcae46890c (patch) | |
| tree | 74be0e9c88736bfba059e71808cf6bebd74a04a3 /library/stdarch/crates/std_detect | |
| parent | 3ac35a7333d8f035e027aad4f17f4e2895bc2480 (diff) | |
| download | rust-67468b20ff1355962089243abcd1f3fcae46890c.tar.gz rust-67468b20ff1355962089243abcd1f3fcae46890c.zip | |
add newly-added s390x features to `is_s390x_feature_detected`
Diffstat (limited to 'library/stdarch/crates/std_detect')
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/arch/s390x.rs | 33 | ||||
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/os/linux/s390x.rs | 37 |
2 files changed, 70 insertions, 0 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/arch/s390x.rs b/library/stdarch/crates/std_detect/src/detect/arch/s390x.rs index be62aeb96ac..812607c6bcd 100644 --- a/library/stdarch/crates/std_detect/src/detect/arch/s390x.rs +++ b/library/stdarch/crates/std_detect/src/detect/arch/s390x.rs @@ -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 } diff --git a/library/stdarch/crates/std_detect/src/detect/os/linux/s390x.rs b/library/stdarch/crates/std_detect/src/detect/os/linux/s390x.rs index e0c79d167ea..5cc35fd3025 100644 --- a/library/stdarch/crates/std_detect/src/detect/os/linux/s390x.rs +++ b/library/stdarch/crates/std_detect/src/detect/os/linux/s390x.rs @@ -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 } |
