x86: Remove brand ID check for Intel processors
Brand ID was a feature that briefly existed in some Pentium III and Pentium 4 CPUs. The CPUs that had non-zero brand ID still have had valid family/model. Brand ID just gives a marketing name for the CPU. Remove the extra code for brand ID check. gcc/ PR target/95660 * common/config/i386/cpuinfo.h (get_intel_cpu): Remove brand_id. (cpu_indicator_init): Likewise. * config/i386/driver-i386.c (host_detect_local_cpu): Updated. gcc/testsuite/ PR target/95660 * gcc.target/i386/builtin_target.c (check_detailed): Updated.
This commit is contained in:
parent
403e166b97
commit
134f7c9419
@ -254,13 +254,12 @@ get_amd_cpu (struct __processor_model *cpu_model,
|
||||
static inline const char *
|
||||
get_intel_cpu (struct __processor_model *cpu_model,
|
||||
struct __processor_model2 *cpu_model2,
|
||||
unsigned int *cpu_features2,
|
||||
unsigned int brand_id)
|
||||
unsigned int *cpu_features2)
|
||||
{
|
||||
const char *cpu = NULL;
|
||||
|
||||
/* Parse family and model only for brand ID 0 and model 6. */
|
||||
if (brand_id != 0 || cpu_model2->__cpu_family != 0x6)
|
||||
/* Parse family and model only for model 6. */
|
||||
if (cpu_model2->__cpu_family != 0x6)
|
||||
return cpu;
|
||||
|
||||
switch (cpu_model2->__cpu_model)
|
||||
@ -758,7 +757,7 @@ cpu_indicator_init (struct __processor_model *cpu_model,
|
||||
|
||||
int max_level;
|
||||
unsigned int vendor;
|
||||
unsigned int model, family, brand_id;
|
||||
unsigned int model, family;
|
||||
unsigned int extended_model, extended_family;
|
||||
|
||||
/* This function needs to run just once. */
|
||||
@ -791,7 +790,6 @@ cpu_indicator_init (struct __processor_model *cpu_model,
|
||||
|
||||
model = (eax >> 4) & 0x0f;
|
||||
family = (eax >> 8) & 0x0f;
|
||||
brand_id = ebx & 0xff;
|
||||
extended_model = (eax >> 12) & 0xf0;
|
||||
extended_family = (eax >> 20) & 0xff;
|
||||
|
||||
@ -813,7 +811,7 @@ cpu_indicator_init (struct __processor_model *cpu_model,
|
||||
get_available_features (cpu_model, cpu_model2, cpu_features2,
|
||||
ecx, edx);
|
||||
/* Get CPU type. */
|
||||
get_intel_cpu (cpu_model, cpu_model2, cpu_features2, brand_id);
|
||||
get_intel_cpu (cpu_model, cpu_model2, cpu_features2);
|
||||
cpu_model->__cpu_vendor = VENDOR_INTEL;
|
||||
}
|
||||
else if (vendor == signature_AMD_ebx)
|
||||
|
@ -555,7 +555,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
|
||||
cpu = "pentium";
|
||||
break;
|
||||
case PROCESSOR_PENTIUMPRO:
|
||||
cpu = get_intel_cpu (&cpu_model, &cpu_model2, cpu_features2, 0);
|
||||
cpu = get_intel_cpu (&cpu_model, &cpu_model2, cpu_features2);
|
||||
if (cpu == NULL)
|
||||
{
|
||||
if (arch)
|
||||
|
@ -46,7 +46,7 @@ check_detailed ()
|
||||
{
|
||||
case VENDOR_INTEL:
|
||||
assert (__builtin_cpu_is ("intel"));
|
||||
get_intel_cpu (&cpu_model, &cpu_model2, cpu_features2, 0);
|
||||
get_intel_cpu (&cpu_model, &cpu_model2, cpu_features2);
|
||||
break;
|
||||
case VENDOR_AMD:
|
||||
assert (__builtin_cpu_is ("amd"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user