mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 17:29:19 +00:00
Using _MSC_VER there was wrong, better just use the already existing ifdefs for
x86 CPU detection for the X86 getHostCPUName too, and create a simple getHostCPUName that returns "generic" for all else. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91240 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0daf77e803
commit
c4174d675b
@ -103,11 +103,8 @@ static void DetectX86FamilyModel(unsigned EAX, unsigned &Family, unsigned &Model
|
||||
Model += ((EAX >> 16) & 0xf) << 4; // Bits 16 - 19
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
std::string sys::getHostCPUName() {
|
||||
#if defined(__x86_64__) || defined(__i386__) || defined(_MSC_VER)
|
||||
unsigned EAX = 0, EBX = 0, ECX = 0, EDX = 0;
|
||||
if (GetX86CpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX))
|
||||
return "generic";
|
||||
@ -295,7 +292,9 @@ std::string sys::getHostCPUName() {
|
||||
return "generic";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
#else
|
||||
std::string sys::getHostCPUName() {
|
||||
return "generic";
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user