@@ -41,13 +41,7 @@ pub(crate) fn detect_features() -> cache::Initializer {
41
41
) ;
42
42
}
43
43
44
- let aes = bits_shift ( aa64isar0, 7 , 4 ) >= 1 ;
45
- let pmull = bits_shift ( aa64isar0, 7 , 4 ) >= 2 ;
46
- let sha1 = bits_shift ( aa64isar0, 11 , 8 ) >= 1 ;
47
- let sha2 = bits_shift ( aa64isar0, 15 , 12 ) >= 1 ;
48
- enable_feature ( Feature :: pmull, pmull) ;
49
- // Crypto is specified as AES + PMULL + SHA1 + SHA2 per LLVM/hosts.cpp
50
- enable_feature ( Feature :: crypto, aes && pmull && sha1 && sha2) ;
44
+ enable_feature ( Feature :: pmull, bits_shift ( aa64isar0, 7 , 4 ) >= 2 ) ;
51
45
enable_feature ( Feature :: tme, bits_shift ( aa64isar0, 27 , 24 ) == 1 ) ;
52
46
enable_feature ( Feature :: lse, bits_shift ( aa64isar0, 23 , 20 ) >= 1 ) ;
53
47
enable_feature ( Feature :: crc, bits_shift ( aa64isar0, 19 , 16 ) >= 1 ) ;
@@ -72,6 +66,10 @@ pub(crate) fn detect_features() -> cache::Initializer {
72
66
// supported, it also requires half-float support:
73
67
enable_feature ( Feature :: asimd, fp && asimd && ( !fphp | asimdhp) ) ;
74
68
// SIMD extensions require SIMD support:
69
+ enable_feature ( Feature :: aes, asimd && bits_shift ( aa64isar0, 7 , 4 ) >= 1 ) ;
70
+ let sha1 = bits_shift ( aa64isar0, 11 , 8 ) >= 1 ;
71
+ let sha2 = bits_shift ( aa64isar0, 15 , 12 ) >= 1 ;
72
+ enable_feature ( Feature :: sha2, asimd && sha1 && sha2) ;
75
73
enable_feature ( Feature :: rdm, asimd && bits_shift ( aa64isar0, 31 , 28 ) >= 1 ) ;
76
74
enable_feature (
77
75
Feature :: dotprod,
0 commit comments