[llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp
Jeff Cohen
jeffc at jolt-lang.org
Sat Jan 28 12:30:29 PST 2006
Changes in directory llvm/lib/Target/X86:
X86Subtarget.cpp updated: 1.20 -> 1.21
---
Log message:
Flesh out AMD family/models.
---
Diffs of the changes: (+27 -2)
X86Subtarget.cpp | 29 +++++++++++++++++++++++++++--
1 files changed, 27 insertions(+), 2 deletions(-)
Index: llvm/lib/Target/X86/X86Subtarget.cpp
diff -u llvm/lib/Target/X86/X86Subtarget.cpp:1.20 llvm/lib/Target/X86/X86Subtarget.cpp:1.21
--- llvm/lib/Target/X86/X86Subtarget.cpp:1.20 Sat Jan 28 13:48:34 2006
+++ llvm/lib/Target/X86/X86Subtarget.cpp Sat Jan 28 14:30:18 2006
@@ -113,10 +113,35 @@
return "generic";
}
} else if (memcmp(text.c, "AuthenticAMD", 12) == 0) {
- // FIXME: fill in remaining family/model combinations
+ // FIXME: this poorly matches the generated SubtargetFeatureKV table. There
+ // appears to be no way to generate the wide variety of AMD-specific targets
+ // from the information returned from CPUID.
switch (Family) {
+ case 4:
+ return "i486";
+ case 5:
+ switch (Model) {
+ case 6:
+ case 7: return "k6";
+ case 8: return "k6-2";
+ case 9:
+ case 13: return "k6-3";
+ default: return "pentium";
+ }
+ case 6:
+ switch (Model) {
+ case 4: return "athlon-tbird";
+ case 6:
+ case 7:
+ case 8: return "athlon-mp";
+ case 10: return "athlon-xp";
+ default: return "athlon";
+ }
case 15:
- return (Em64T) ? "athlon64" : "athlon";
+ switch (Model) {
+ case 5: return "athlon-fx"; // also opteron
+ default: return "athlon64";
+ }
default:
return "generic";
More information about the llvm-commits
mailing list