Changeset View
Changeset View
Standalone View
Standalone View
source/Core/ArchSpec.cpp
Show First 20 Lines • Show All 499 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
const CoreDefinition *core_def = FindCoreDefinition (m_core); | const CoreDefinition *core_def = FindCoreDefinition (m_core); | ||||
if (core_def) | if (core_def) | ||||
return core_def->name; | return core_def->name; | ||||
return "unknown"; | return "unknown"; | ||||
} | } | ||||
std::string | std::string | ||||
ArchSpec::GetClangTargetABI () | |||||
{ std::string abi; | |||||
const llvm::Triple::ArchType machine = GetMachine(); | |||||
if (machine == llvm::Triple::mips || | |||||
machine == llvm::Triple::mipsel || | |||||
machine == llvm::Triple::mips64 || | |||||
machine == llvm::Triple::mips64el) | |||||
{ | |||||
switch (GetFlags () & eMIPSABI_mask) | |||||
{ | |||||
case eMIPSABI_N64: | |||||
abi = "n64"; break; | |||||
case eMIPSABI_N32: | |||||
abi = "n32"; break; | |||||
case eMIPSABI_O32: | |||||
abi = "o32"; break; | |||||
default: | |||||
break; | |||||
} | |||||
} | |||||
return abi; | |||||
} | |||||
std::string | |||||
ArchSpec::GetClangTargetCPU () | ArchSpec::GetClangTargetCPU () | ||||
{ | { | ||||
std::string cpu; | std::string cpu; | ||||
const llvm::Triple::ArchType machine = GetMachine(); | const llvm::Triple::ArchType machine = GetMachine(); | ||||
if (machine == llvm::Triple::mips || | if (machine == llvm::Triple::mips || | ||||
machine == llvm::Triple::mipsel || | machine == llvm::Triple::mipsel || | ||||
machine == llvm::Triple::mips64 || | machine == llvm::Triple::mips64 || | ||||
▲ Show 20 Lines • Show All 991 Lines • Show Last 20 Lines |