forked from OSchip/llvm-project
This patch adds support of le32 pseudo-cpu that stands for generic
32-bit little-endian CPU. Used by PNaCl and Emscripten. llvm-svn: 138335
This commit is contained in:
parent
797f1e23f6
commit
771ef8c66a
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue