Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler-rt/lib/builtins/cpu_model/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static const char *getIntelProcessorTypeAndSubtype(unsigned Family,
const char *CPU = 0;

switch (Family) {
case 6:
case 0x6:
switch (Model) {
case 0x0f: // Intel Core 2 Duo processor, Intel Core 2 Duo mobile
// processor, Intel Core 2 Quad processor, Intel Core 2 Quad
Expand Down Expand Up @@ -626,7 +626,7 @@ static const char *getIntelProcessorTypeAndSubtype(unsigned Family,
break;
}
break;
case 19:
case 0x13:
switch (Model) {
// Diamond Rapids:
case 0x01:
Expand Down
12 changes: 6 additions & 6 deletions llvm/lib/TargetParser/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,20 +759,20 @@ static StringRef getIntelProcessorTypeAndSubtype(unsigned Family,
StringRef CPU;

switch (Family) {
case 3:
case 0x3:
CPU = "i386";
break;
case 4:
case 0x4:
CPU = "i486";
break;
case 5:
case 0x5:
if (testFeature(X86::FEATURE_MMX)) {
CPU = "pentium-mmx";
break;
}
CPU = "pentium";
break;
case 6:
case 0x6:
switch (Model) {
case 0x0f: // Intel Core 2 Duo processor, Intel Core 2 Duo mobile
// processor, Intel Core 2 Quad processor, Intel Core 2 Quad
Expand Down Expand Up @@ -1120,7 +1120,7 @@ static StringRef getIntelProcessorTypeAndSubtype(unsigned Family,
break;
}
break;
case 15: {
case 0xf: {
Copy link
Contributor

@e-kud e-kud Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether it is better to use 0x0f since now we have two hex digits for families.

if (testFeature(X86::FEATURE_64BIT)) {
CPU = "nocona";
break;
Expand All @@ -1132,7 +1132,7 @@ static StringRef getIntelProcessorTypeAndSubtype(unsigned Family,
CPU = "pentium4";
break;
}
case 19:
case 0x13:
switch (Model) {
// Diamond Rapids:
case 0x01:
Expand Down