Add support for r600 (AMD GPUs HD2XXX - HD6XXX) target triplet.

Patch by Tom Stellard!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152400 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov 2012-03-09 10:09:36 +00:00
parent 00cbccceb3
commit 7415659bf8
2 changed files with 11 additions and 0 deletions

View File

@ -53,6 +53,7 @@ public:
msp430, // MSP430: msp430
ppc, // PPC: powerpc
ppc64, // PPC64: powerpc64, ppu
r600, // R600: AMD GPUs HD2XXX - HD6XXX
sparc, // Sparc: sparc
sparcv9, // Sparcv9: Sparcv9
tce, // TCE (http://tce.cs.tut.fi/): tce

View File

@ -29,6 +29,7 @@ const char *Triple::getArchTypeName(ArchType Kind) {
case msp430: return "msp430";
case ppc64: return "powerpc64";
case ppc: return "powerpc";
case r600: return "r600";
case sparc: return "sparc";
case sparcv9: return "sparcv9";
case tce: return "tce";
@ -63,6 +64,8 @@ const char *Triple::getArchTypePrefix(ArchType Kind) {
case hexagon: return "hexagon";
case r600: return "r600";
case sparcv9:
case sparc: return "sparc";
@ -145,6 +148,7 @@ Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) {
.Case("ppc32", ppc)
.Case("ppc", ppc)
.Case("mblaze", mblaze)
.Case("r600", r600)
.Case("hexagon", hexagon)
.Case("sparc", sparc)
.Case("sparcv9", sparcv9)
@ -184,6 +188,7 @@ Triple::ArchType Triple::getArchTypeForDarwinArchName(StringRef Str) {
// This is derived from the driver driver.
.Cases("arm", "armv4t", "armv5", "armv6", Triple::arm)
.Cases("armv7", "armv7f", "armv7k", "armv7s", "xscale", Triple::arm)
.Case("r600", Triple::r600)
.Case("ptx32", Triple::ptx32)
.Case("ptx64", Triple::ptx64)
.Case("amdil", Triple::amdil)
@ -206,6 +211,7 @@ const char *Triple::getArchNameForAssembler() {
.Cases("armv5", "armv5e", "thumbv5", "thumbv5e", "armv5")
.Cases("armv6", "thumbv6", "armv6")
.Cases("armv7", "thumbv7", "armv7")
.Case("r600", "r600")
.Case("ptx32", "ptx32")
.Case("ptx64", "ptx64")
.Case("le32", "le32")
@ -234,6 +240,7 @@ static Triple::ArchType parseArch(StringRef ArchName) {
.Cases("mipsel", "mipsallegrexel", Triple::mipsel)
.Cases("mips64", "mips64eb", Triple::mips64)
.Case("mips64el", Triple::mips64el)
.Case("r600", Triple::r600)
.Case("hexagon", Triple::hexagon)
.Case("sparc", Triple::sparc)
.Case("sparcv9", Triple::sparcv9)
@ -641,6 +648,7 @@ static unsigned getArchPointerBitWidth(llvm::Triple::ArchType Arch) {
case llvm::Triple::mipsel:
case llvm::Triple::ppc:
case llvm::Triple::ptx32:
case llvm::Triple::r600:
case llvm::Triple::sparc:
case llvm::Triple::tce:
case llvm::Triple::thumb:
@ -689,6 +697,7 @@ Triple Triple::get32BitArchVariant() const {
case Triple::mipsel:
case Triple::ppc:
case Triple::ptx32:
case Triple::r600:
case Triple::sparc:
case Triple::tce:
case Triple::thumb:
@ -718,6 +727,7 @@ Triple Triple::get64BitArchVariant() const {
case Triple::le32:
case Triple::mblaze:
case Triple::msp430:
case Triple::r600:
case Triple::tce:
case Triple::thumb:
case Triple::xcore: