mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-22 13:32:09 +00:00
For non-x86 host, used generic as CPU name.
llvm-svn: 134741
This commit is contained in:
parent
63e02375a8
commit
69f14d6012
@ -140,8 +140,13 @@ MCSubtargetInfo *X86_MC::createX86MCSubtargetInfo(StringRef TT, StringRef CPU,
|
||||
}
|
||||
|
||||
std::string CPUName = CPU;
|
||||
if (CPUName.empty())
|
||||
if (CPUName.empty()) {
|
||||
#if defined (__x86_64__) || defined(__i386__)
|
||||
CPUName = sys::getHostCPUName();
|
||||
#else
|
||||
CPUName = "generic";
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ArchFS.empty() && CPUName.empty() && hasX86_64())
|
||||
// Auto-detect if host is 64-bit capable, it's the default if true.
|
||||
|
@ -258,12 +258,17 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &CPU,
|
||||
ArchFS = FS;
|
||||
}
|
||||
|
||||
std::string CPUName = CPU;
|
||||
if (CPUName.empty())
|
||||
CPUName = sys::getHostCPUName();
|
||||
|
||||
// Determine default and user specified characteristics
|
||||
if (!CPUName.empty() || !ArchFS.empty()) {
|
||||
if (!ArchFS.empty()) {
|
||||
std::string CPUName = CPU;
|
||||
if (CPUName.empty()) {
|
||||
#if defined (__x86_64__) || defined(__i386__)
|
||||
CPUName = sys::getHostCPUName();
|
||||
#else
|
||||
CPUName = "generic";
|
||||
#endif
|
||||
}
|
||||
|
||||
// If feature string is not empty, parse features string.
|
||||
ParseSubtargetFeatures(CPUName, ArchFS);
|
||||
// All X86-64 CPUs also have SSE2, however user might request no SSE via
|
||||
|
Loading…
x
Reference in New Issue
Block a user