diff options
Diffstat (limited to 'sysdeps/x86/include/cpu-features.h')
-rw-r--r-- | sysdeps/x86/include/cpu-features.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sysdeps/x86/include/cpu-features.h b/sysdeps/x86/include/cpu-features.h index a3f11ba..28be3e0 100644 --- a/sysdeps/x86/include/cpu-features.h +++ b/sysdeps/x86/include/cpu-features.h @@ -43,11 +43,11 @@ enum /* Only used directly in cpu-features.c. */ #define CPU_FEATURE_SET(ptr, name) \ - ptr->features[index_cpu_##name].usable.reg_##name |= bit_cpu_##name; + ptr->features[index_cpu_##name].active.reg_##name |= bit_cpu_##name; #define CPU_FEATURE_UNSET(ptr, name) \ - ptr->features[index_cpu_##name].usable.reg_##name &= ~bit_cpu_##name; -#define CPU_FEATURE_SET_USABLE(ptr, name) \ - ptr->features[index_cpu_##name].usable.reg_##name \ + ptr->features[index_cpu_##name].active.reg_##name &= ~bit_cpu_##name; +#define CPU_FEATURE_SET_ACTIVE(ptr, name) \ + ptr->features[index_cpu_##name].active.reg_##name \ |= ptr->features[index_cpu_##name].cpuid.reg_##name & bit_cpu_##name; #define CPU_FEATURE_PREFERRED_P(ptr, name) \ ((ptr->preferred[index_arch_##name] & bit_arch_##name) != 0) @@ -55,10 +55,14 @@ enum #define CPU_FEATURE_CHECK_P(ptr, name, check) \ ((ptr->features[index_cpu_##name].check.reg_##name \ & bit_cpu_##name) != 0) -#define CPU_FEATURE_CPU_P(ptr, name) \ +#define CPU_FEATURE_PRESENT_P(ptr, name) \ CPU_FEATURE_CHECK_P (ptr, name, cpuid) +#define CPU_FEATURE_ACTIVE_P(ptr, name) \ + CPU_FEATURE_CHECK_P (ptr, name, active) +#define CPU_FEATURE_CPU_P(ptr, name) \ + CPU_FEATURE_PRESENT_P (ptr, name) #define CPU_FEATURE_USABLE_P(ptr, name) \ - CPU_FEATURE_CHECK_P (ptr, name, usable) + CPU_FEATURE_ACTIVE_P (ptr, name) /* HAS_CPU_FEATURE evaluates to true if CPU supports the feature. */ #define HAS_CPU_FEATURE(name) \ @@ -849,8 +853,8 @@ struct cpuid_feature_internal }; union { - unsigned int usable_array[4]; - struct cpuid_registers usable; + unsigned int active_array[4]; + struct cpuid_registers active; }; }; |