forked from OSchip/llvm-project
Add the triple for the Sony Playstation®4.
Lots more to follow. llvm-svn: 227060
This commit is contained in:
parent
efdbf4c0b7
commit
38babd1eeb
|
@ -141,7 +141,8 @@ public:
|
||||||
AIX,
|
AIX,
|
||||||
CUDA, // NVIDIA CUDA
|
CUDA, // NVIDIA CUDA
|
||||||
NVCL, // NVIDIA OpenCL
|
NVCL, // NVIDIA OpenCL
|
||||||
AMDHSA // AMD HSA Runtime
|
AMDHSA, // AMD HSA Runtime
|
||||||
|
PS4
|
||||||
};
|
};
|
||||||
enum EnvironmentType {
|
enum EnvironmentType {
|
||||||
UnknownEnvironment,
|
UnknownEnvironment,
|
||||||
|
@ -455,6 +456,19 @@ public:
|
||||||
return getObjectFormat() == Triple::MachO;
|
return getObjectFormat() == Triple::MachO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// \brief Tests whether the target is the PS4 CPU
|
||||||
|
bool isPS4CPU() const {
|
||||||
|
return getArch() == Triple::x86_64 &&
|
||||||
|
getVendor() == Triple::SCEI &&
|
||||||
|
getOS() == Triple::PS4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// \brief Tests whether the target is the PS4 platform
|
||||||
|
bool isPS4() const {
|
||||||
|
return getVendor() == Triple::SCEI &&
|
||||||
|
getOS() == Triple::PS4;
|
||||||
|
}
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
/// @name Mutators
|
/// @name Mutators
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
@ -163,6 +163,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
|
||||||
case CUDA: return "cuda";
|
case CUDA: return "cuda";
|
||||||
case NVCL: return "nvcl";
|
case NVCL: return "nvcl";
|
||||||
case AMDHSA: return "amdhsa";
|
case AMDHSA: return "amdhsa";
|
||||||
|
case PS4: return "ps4";
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm_unreachable("Invalid OSType");
|
llvm_unreachable("Invalid OSType");
|
||||||
|
@ -356,6 +357,7 @@ static Triple::OSType parseOS(StringRef OSName) {
|
||||||
.StartsWith("cuda", Triple::CUDA)
|
.StartsWith("cuda", Triple::CUDA)
|
||||||
.StartsWith("nvcl", Triple::NVCL)
|
.StartsWith("nvcl", Triple::NVCL)
|
||||||
.StartsWith("amdhsa", Triple::AMDHSA)
|
.StartsWith("amdhsa", Triple::AMDHSA)
|
||||||
|
.StartsWith("ps4", Triple::PS4)
|
||||||
.Default(Triple::UnknownOS);
|
.Default(Triple::UnknownOS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue