This removes the athlon type and simplifies the string decoding. We only really need these type/subtype breaks where we need to match libgcc/compiler-rt and these CPUs aren't part of that.
I'm looking into moving some of this information to a .def file to share with clang's __builtin_cpu_is handling. And while these CPUs aren't part of that the less lines I have to deal with in the .def file the better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317354
91177308-0d34-0410-b5e6-
96231b3b80d8
INTEL_PRESCOTT,
AMD_i486,
AMDPENTIUM,
- AMDATHLON,
+ AMD_ATHLON,
+ AMD_ATHLON_XP,
+ AMD_K8,
+ AMD_K8SSE3,
INTEL_GOLDMONT,
CPU_TYPE_MAX
};
AMDPENTIUM_K62,
AMDPENTIUM_K63,
AMDPENTIUM_GEODE,
- AMDATHLON_CLASSIC,
- AMDATHLON_XP,
- AMDATHLON_K8,
- AMDATHLON_K8SSE3,
CPU_SUBTYPE_MAX
};
}
break;
case 6:
- *Type = AMDATHLON;
if (Features & (1 << FEATURE_SSE)) {
- *Subtype = AMDATHLON_XP;
+ *Type = AMD_ATHLON_XP;
break; // "athlon-xp"
}
- *Subtype = AMDATHLON_CLASSIC;
+ *Type = AMD_ATHLON;
break; // "athlon"
case 15:
- *Type = AMDATHLON;
if (Features & (1 << FEATURE_SSE3)) {
- *Subtype = AMDATHLON_K8SSE3;
+ *Type = AMD_K8SSE3;
break; // "k8-sse3"
}
- *Subtype = AMDATHLON_K8;
+ *Type = AMD_K8;
break; // "k8"
case 16:
*Type = AMDFAM10H; // "amdfam10"
default:
return "pentium";
}
- case AMDATHLON:
- switch (Subtype) {
- case AMDATHLON_CLASSIC:
- return "athlon";
- case AMDATHLON_XP:
- return "athlon-xp";
- case AMDATHLON_K8:
- return "k8";
- case AMDATHLON_K8SSE3:
- return "k8-sse3";
- default:
- llvm_unreachable("Unexpected subtype!");
- }
+ case AMD_ATHLON:
+ return "athlon";
+ case AMD_ATHLON_XP:
+ return "athlon-xp";
+ case AMD_K8:
+ return "k8";
+ case AMD_K8SSE3:
+ return "k8-sse3";
case AMDFAM10H:
return "amdfam10";
case AMD_BTVER1: