[llvm] r212745 - Add the CSR company and the Kalimba DSP processor to Triple.

Eric Christopher echristo at gmail.com
Thu Jul 10 10:26:54 PDT 2014


Author: echristo
Date: Thu Jul 10 12:26:54 2014
New Revision: 212745

URL: http://llvm.org/viewvc/llvm-project?rev=212745&view=rev
Log:
Add the CSR company and the Kalimba DSP processor to Triple.

Patch by Matthew Gardiner with fixes by me.

Modified:
    llvm/trunk/include/llvm/ADT/Triple.h
    llvm/trunk/lib/Support/Triple.cpp

Modified: llvm/trunk/include/llvm/ADT/Triple.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=212745&r1=212744&r2=212745&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Triple.h (original)
+++ llvm/trunk/include/llvm/ADT/Triple.h Thu Jul 10 12:26:54 2014
@@ -76,7 +76,8 @@ public:
     le32,       // le32: generic little-endian 32-bit CPU (PNaCl / Emscripten)
     amdil,      // amdil: amd IL
     spir,       // SPIR: standard portable IR for OpenCL 32-bit version
-    spir64      // SPIR: standard portable IR for OpenCL 64-bit version
+    spir64,     // SPIR: standard portable IR for OpenCL 64-bit version
+    kalimba     // Kalimba: generic kalimba
   };
   enum VendorType {
     UnknownVendor,
@@ -89,7 +90,8 @@ public:
     Freescale,
     IBM,
     ImaginationTechnologies,
-    NVIDIA
+    NVIDIA,
+    CSR
   };
   enum OSType {
     UnknownOS,

Modified: llvm/trunk/lib/Support/Triple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=212745&r1=212744&r2=212745&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Triple.cpp (original)
+++ llvm/trunk/lib/Support/Triple.cpp Thu Jul 10 12:26:54 2014
@@ -50,6 +50,7 @@ const char *Triple::getArchTypeName(Arch
   case amdil:       return "amdil";
   case spir:        return "spir";
   case spir64:      return "spir64";
+  case kalimba:     return "kalimba";
   }
 
   llvm_unreachable("Invalid ArchType!");
@@ -101,6 +102,7 @@ const char *Triple::getArchTypePrefix(Ar
   case amdil:       return "amdil";
   case spir:        return "spir";
   case spir64:      return "spir";
+  case kalimba:     return "kalimba";
   }
 }
 
@@ -117,6 +119,7 @@ const char *Triple::getVendorTypeName(Ve
   case IBM: return "ibm";
   case ImaginationTechnologies: return "img";
   case NVIDIA: return "nvidia";
+  case CSR: return "csr";
   }
 
   llvm_unreachable("Invalid VendorType!");
@@ -208,6 +211,7 @@ Triple::ArchType Triple::getArchTypeForL
     .Case("amdil", amdil)
     .Case("spir", spir)
     .Case("spir64", spir64)
+    .Case("kalimba", kalimba)
     .Default(UnknownArch);
 }
 
@@ -281,6 +285,7 @@ static Triple::ArchType parseArch(String
     .Case("amdil", Triple::amdil)
     .Case("spir", Triple::spir)
     .Case("spir64", Triple::spir64)
+    .Case("kalimba", Triple::kalimba)
     .Default(Triple::UnknownArch);
 }
 
@@ -295,6 +300,7 @@ static Triple::VendorType parseVendor(St
     .Case("ibm", Triple::IBM)
     .Case("img", Triple::ImaginationTechnologies)
     .Case("nvidia", Triple::NVIDIA)
+    .Case("csr", Triple::CSR)
     .Default(Triple::UnknownVendor);
 }
 
@@ -800,6 +806,7 @@ static unsigned getArchPointerBitWidth(l
   case llvm::Triple::x86:
   case llvm::Triple::xcore:
   case llvm::Triple::spir:
+  case llvm::Triple::kalimba:
     return 32;
 
   case llvm::Triple::arm64:
@@ -851,6 +858,7 @@ Triple Triple::get32BitArchVariant() con
   case Triple::arm:
   case Triple::armeb:
   case Triple::hexagon:
+  case Triple::kalimba:
   case Triple::le32:
   case Triple::mips:
   case Triple::mipsel:
@@ -885,6 +893,7 @@ Triple Triple::get64BitArchVariant() con
   case Triple::arm:
   case Triple::armeb:
   case Triple::hexagon:
+  case Triple::kalimba:
   case Triple::le32:
   case Triple::msp430:
   case Triple::r600:





More information about the llvm-commits mailing list