@@ -140,14 +140,6 @@ macro_rules! __unstable_detect_feature {
140140 $crate:: vendor:: __unstable_detect_feature(
141141 $crate:: vendor:: __Feature:: xsaveopt{ } )
142142 } ;
143- ( "xsave" ) => {
144- $crate:: vendor:: __unstable_detect_feature(
145- $crate:: vendor:: __Feature:: xsave{ } )
146- } ;
147- ( "xsaveopt" ) => {
148- $crate:: vendor:: __unstable_detect_feature(
149- $crate:: vendor:: __Feature:: xsaveopt{ } )
150- } ;
151143 ( "xsaves" ) => {
152144 $crate:: vendor:: __unstable_detect_feature(
153145 $crate:: vendor:: __Feature:: xsaves{ } )
@@ -265,9 +257,9 @@ pub fn detect_features() -> usize {
265257 // leaf value for subsequent calls of `cpuinfo` in range [0,
266258 // 0x8000_0000]. - The vendor ID is stored in 12 u8 ascii chars,
267259 // returned in EBX, EDX, and ECX (in that order):
268- let ( max_leaf , vendor_id) = unsafe {
260+ let ( max_basic_leaf , vendor_id) = unsafe {
269261 let CpuidResult {
270- eax : max_leaf ,
262+ eax : max_basic_leaf ,
271263 ebx,
272264 ecx,
273265 edx,
@@ -278,10 +270,10 @@ pub fn detect_features() -> usize {
278270 mem:: transmute ( ecx) ,
279271 ] ;
280272 let vendor_id: [ u8 ; 12 ] = mem:: transmute ( vendor_id) ;
281- ( max_leaf , vendor_id)
273+ ( max_basic_leaf , vendor_id)
282274 } ;
283275
284- if max_leaf < 1 {
276+ if max_basic_leaf < 1 {
285277 // Earlier Intel 486, CPUID not implemented
286278 return value;
287279 }
@@ -296,7 +288,8 @@ pub fn detect_features() -> usize {
296288
297289 // EAX = 7, ECX = 0: Queries "Extended Features";
298290 // Contains information about bmi,bmi2, and avx2 support.
299- let ( extended_features_ebx, extended_features_ecx) = if max_leaf >= 7 {
291+ let ( extended_features_ebx, extended_features_ecx) = if max_basic_leaf >= 7
292+ {
300293 let CpuidResult { ebx, ecx, .. } = unsafe { __cpuid ( 0x0000_0007_u32 ) } ;
301294 ( ebx, ecx)
302295 } else {
@@ -307,13 +300,13 @@ pub fn detect_features() -> usize {
307300 // - EAX returns the max leaf value for extended information, that is,
308301 // `cpuid` calls in range [0x8000_0000; u32::MAX]:
309302 let CpuidResult {
310- eax : extended_max_leaf ,
303+ eax : extended_max_basic_leaf ,
311304 ..
312305 } = unsafe { __cpuid ( 0x8000_0000_u32 ) } ;
313306
314307 // EAX = 0x8000_0001, ECX=0: Queries "Extended Processor Info and Feature
315308 // Bits"
316- let extended_proc_info_ecx = if extended_max_leaf >= 1 {
309+ let extended_proc_info_ecx = if extended_max_basic_leaf >= 1 {
317310 let CpuidResult { ecx, .. } = unsafe { __cpuid ( 0x8000_0001_u32 ) } ;
318311 ecx
319312 } else {
@@ -393,7 +386,7 @@ pub fn detect_features() -> usize {
393386
394387 // Processor Extended State Enumeration Sub-leaf (EAX = 0DH, ECX =
395388 // 1)
396- if max_leaf >= 0xd {
389+ if max_basic_leaf >= 0xd {
397390 let CpuidResult {
398391 eax : proc_extended_state1_eax,
399392 ..
0 commit comments