[llvm-commits] [llvm] r138335 - in /llvm/trunk: include/llvm/ADT/Triple.h lib/Support/Triple.cpp
Ivan Krasin
krasin at chromium.org
Tue Aug 23 09:59:00 PDT 2011
Author: krasin
Date: Tue Aug 23 11:59:00 2011
New Revision: 138335
URL: http://llvm.org/viewvc/llvm-project?rev=138335&view=rev
Log:
This patch adds support of le32 pseudo-cpu that stands for generic
32-bit little-endian CPU. Used by PNaCl and Emscripten.
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=138335&r1=138334&r2=138335&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Triple.h (original)
+++ llvm/trunk/include/llvm/ADT/Triple.h Tue Aug 23 11:59:00 2011
@@ -63,6 +63,7 @@
mblaze, // MBlaze: mblaze
ptx32, // PTX: ptx (32-bit)
ptx64, // PTX: ptx (64-bit)
+ le32, // le32: generic little-endian 32-bit CPU (PNaCl / Emscripten)
InvalidArch
};
Modified: llvm/trunk/lib/Support/Triple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=138335&r1=138334&r2=138335&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Triple.cpp (original)
+++ llvm/trunk/lib/Support/Triple.cpp Tue Aug 23 11:59:00 2011
@@ -38,6 +38,7 @@
case mblaze: return "mblaze";
case ptx32: return "ptx32";
case ptx64: return "ptx64";
+ case le32: return "le32";
}
return "<invalid>";
@@ -72,6 +73,8 @@
case ptx32: return "ptx";
case ptx64: return "ptx";
+
+ case le32: return "le32";
}
}
@@ -171,6 +174,8 @@
return ptx32;
if (Name == "ptx64")
return ptx64;
+ if (Name == "le32")
+ return le32;
return UnknownArch;
}
@@ -249,6 +254,8 @@
return "ptx32";
if (Str == "ptx64")
return "ptx64";
+ if (Str == "le32")
+ return "le32";
return NULL;
}
@@ -302,6 +309,8 @@
return ptx32;
else if (ArchName == "ptx64")
return ptx64;
+ else if (ArchName == "le32")
+ return le32;
else
return UnknownArch;
}
More information about the llvm-commits
mailing list