diff options
author | Ivan Krasin <krasin@chromium.org> | 2011-08-23 16:59:00 +0000 |
---|---|---|
committer | Ivan Krasin <krasin@chromium.org> | 2011-08-23 16:59:00 +0000 |
commit | 38fb2db6c9f64a59875d034e2a2cab27603c1884 (patch) | |
tree | 56f399562e1869a8c9897f39e8e133f3b889d92f | |
parent | 691a4882ed086912edfe60da225bdc3f3e2f9a82 (diff) | |
download | llvm-38fb2db6c9f64a59875d034e2a2cab27603c1884.tar.gz llvm-38fb2db6c9f64a59875d034e2a2cab27603c1884.tar.bz2 llvm-38fb2db6c9f64a59875d034e2a2cab27603c1884.tar.xz |
This patch adds support of le32 pseudo-cpu that stands for generic
32-bit little-endian CPU. Used by PNaCl and Emscripten.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138335 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/ADT/Triple.h | 1 | ||||
-rw-r--r-- | lib/Support/Triple.cpp | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index 86817e93c0..22d68a11d7 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -63,6 +63,7 @@ public: mblaze, // MBlaze: mblaze ptx32, // PTX: ptx (32-bit) ptx64, // PTX: ptx (64-bit) + le32, // le32: generic little-endian 32-bit CPU (PNaCl / Emscripten) InvalidArch }; diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index ccb1a24976..af934ae3fa 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -38,6 +38,7 @@ const char *Triple::getArchTypeName(ArchType Kind) { case mblaze: return "mblaze"; case ptx32: return "ptx32"; case ptx64: return "ptx64"; + case le32: return "le32"; } return "<invalid>"; @@ -72,6 +73,8 @@ const char *Triple::getArchTypePrefix(ArchType Kind) { case ptx32: return "ptx"; case ptx64: return "ptx"; + + case le32: return "le32"; } } @@ -171,6 +174,8 @@ Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) { return ptx32; if (Name == "ptx64") return ptx64; + if (Name == "le32") + return le32; return UnknownArch; } @@ -249,6 +254,8 @@ const char *Triple::getArchNameForAssembler() { return "ptx32"; if (Str == "ptx64") return "ptx64"; + if (Str == "le32") + return "le32"; return NULL; } @@ -302,6 +309,8 @@ Triple::ArchType Triple::ParseArch(StringRef ArchName) { return ptx32; else if (ArchName == "ptx64") return ptx64; + else if (ArchName == "le32") + return le32; else return UnknownArch; } |