diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-06-12 16:33:23 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-06-24 08:12:38 -0700 |
commit | 134f7c941929b3d099322a89928c04e5ac69267e (patch) | |
tree | 56a35aef501d5b9b5fdbabdd9b45f0b31004242d /gcc/common | |
parent | 403e166b974f53982d78efdd70938d05b6983b2a (diff) |
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.
Diffstat (limited to 'gcc/common')
-rw-r--r-- | gcc/common/config/i386/cpuinfo.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h index 27b7b4d8581..3eda53240f6 100644 --- a/gcc/common/config/i386/cpuinfo.h +++ b/gcc/common/config/i386/cpuinfo.h @@ -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) |