@@ -69,12 +69,13 @@ pub(crate) fn detect_features() -> cache::Initializer {
6969
7070 // EAX = 7, ECX = 0: Queries "Extended Features";
7171 // Contains information about bmi,bmi2, and avx2 support.
72- let ( extended_features_ebx, extended_features_ecx) = if max_basic_leaf >= 7 {
73- let CpuidResult { ebx, ecx, .. } = unsafe { __cpuid ( 0x0000_0007_u32 ) } ;
74- ( ebx, ecx)
75- } else {
76- ( 0 , 0 ) // CPUID does not support "Extended Features"
77- } ;
72+ let ( extended_features_ebx, extended_features_ecx, extended_features_edx) =
73+ if max_basic_leaf >= 7 {
74+ let CpuidResult { ebx, ecx, edx, .. } = unsafe { __cpuid ( 0x0000_0007_u32 ) } ;
75+ ( ebx, ecx, edx)
76+ } else {
77+ ( 0 , 0 , 0 ) // CPUID does not support "Extended Features"
78+ } ;
7879
7980 // EAX = 0x8000_0000, ECX = 0: Get Highest Extended Function Supported
8081 // - EAX returns the max leaf value for extended information, that is,
@@ -217,6 +218,7 @@ pub(crate) fn detect_features() -> cache::Initializer {
217218 enable ( extended_features_ecx, 11 , Feature :: avx512vnni) ;
218219 enable ( extended_features_ecx, 12 , Feature :: avx512bitalg) ;
219220 enable ( extended_features_ecx, 14 , Feature :: avx512vpopcntdq) ;
221+ enable ( extended_features_edx, 23 , Feature :: avx512fp16) ;
220222 }
221223 }
222224 }
0 commit comments