summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-11-02 19:13:34 +0000
committerCraig Topper <craig.topper@intel.com>2017-11-02 19:13:34 +0000
commit1494915a3af9232cdc7b7cfd0de9f16322d91978 (patch)
tree4af1e9dddb1370174265735d5d9bae4284dc939f
parenta233e16cd880d0ff30268e14e657a10026a47121 (diff)
downloadbcm5719-llvm-1494915a3af9232cdc7b7cfd0de9f16322d91978.tar.gz
bcm5719-llvm-1494915a3af9232cdc7b7cfd0de9f16322d91978.zip
[X86] Simplify the pentium4 code in getHostCPUName to be based on feature flags. Don't use 'x86-64' ever.
'x86-64' has started to reflect a sort of generic tuning flag for more modern 64-bit CPUs. We probably shouldn't be using it as the name of an unidentifiable pentium4. So use nocona for all 64-bit pentium4s instead. llvm-svn: 317230
-rw-r--r--llvm/lib/Support/Host.cpp40
1 files changed, 6 insertions, 34 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp
index 7fbe9ad6a5c..c167df5a444 100644
--- a/llvm/lib/Support/Host.cpp
+++ b/llvm/lib/Support/Host.cpp
@@ -351,7 +351,6 @@ enum ProcessorTypes {
INTEL_PENTIUM_IV,
INTEL_PENTIUM_M,
INTEL_CORE_DUO,
- INTEL_X86_64,
INTEL_NOCONA,
INTEL_PRESCOTT,
AMD_i486,
@@ -819,40 +818,15 @@ getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model,
}
break;
case 15: {
- switch (Model) {
- case 0: // Pentium 4 processor, Intel Xeon processor. All processors are
- // model 00h and manufactured using the 0.18 micron process.
- case 1: // Pentium 4 processor, Intel Xeon processor, Intel Xeon
- // processor MP, and Intel Celeron processor. All processors are
- // model 01h and manufactured using the 0.18 micron process.
- case 2: // Pentium 4 processor, Mobile Intel Pentium 4 processor - M,
- // Intel Xeon processor, Intel Xeon processor MP, Intel Celeron
- // processor, and Mobile Intel Celeron processor. All processors
- // are model 02h and manufactured using the 0.13 micron process.
- *Type = ((Features2 & (1 << (FEATURE_EM64T - 32))) ? INTEL_X86_64
- : INTEL_PENTIUM_IV);
- break;
-
- case 3: // Pentium 4 processor, Intel Xeon processor, Intel Celeron D
- // processor. All processors are model 03h and manufactured using
- // the 90 nm process.
- case 4: // Pentium 4 processor, Pentium 4 processor Extreme Edition,
- // Pentium D processor, Intel Xeon processor, Intel Xeon
- // processor MP, Intel Celeron D processor. All processors are
- // model 04h and manufactured using the 90 nm process.
- case 6: // Pentium 4 processor, Pentium D processor, Pentium processor
- // Extreme Edition, Intel Xeon processor, Intel Xeon processor
- // MP, Intel Celeron D processor. All processors are model 06h
- // and manufactured using the 65 nm process.
- *Type = ((Features2 & (1 << (FEATURE_EM64T - 32))) ? INTEL_NOCONA
- : INTEL_PRESCOTT);
+ if (Features2 & (1 << (FEATURE_EM64T - 32))) {
+ *Type = INTEL_NOCONA;
break;
-
- default:
- *Type = ((Features2 & (1 << (FEATURE_EM64T - 32))) ? INTEL_X86_64
- : INTEL_PENTIUM_IV);
+ }
+ if (Features & (1 << FEATURE_SSE3)) {
+ *Type = INTEL_PRESCOTT;
break;
}
+ *Type = INTEL_PENTIUM_IV;
break;
}
default:
@@ -1150,8 +1124,6 @@ StringRef sys::getHostCPUName() {
return "knl";
case INTEL_KNM:
return "knm";
- case INTEL_X86_64:
- return "x86-64";
case INTEL_NOCONA:
return "nocona";
case INTEL_PRESCOTT:
OpenPOWER on IntegriCloud