X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FTriple.cpp;h=9796ca56f476449e2248bde6c8c02f0439fbabf8;hb=7262c19c41fd291af7a23a6bb8558314ef8425dd;hp=2fec094d79f0a25fbaeb5e1f5aee28b48aa40497;hpb=cc9fa81fe1675b29fa813945c52abee692229143;p=oota-llvm.git diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index 2fec094d79f..9796ca56f47 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -33,12 +33,14 @@ const char *Triple::getArchTypeName(ArchType Kind) { case ppc64: return "powerpc64"; case ppc: return "powerpc"; case sparc: return "sparc"; + case sparcv9: return "sparcv9"; case systemz: return "s390x"; case tce: return "tce"; case thumb: return "thumb"; case x86: return "i386"; case x86_64: return "x86_64"; case xcore: return "xcore"; + case mblaze: return "mblaze"; } return ""; @@ -61,6 +63,9 @@ const char *Triple::getArchTypePrefix(ArchType Kind) { case ppc64: case ppc: return "ppc"; + case mblaze: return "mblaze"; + + case sparcv9: case sparc: return "sparc"; case x86: @@ -125,8 +130,12 @@ Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) { return ppc64; if (Name == "ppc") return ppc; + if (Name == "mblaze") + return mblaze; if (Name == "sparc") return sparc; + if (Name == "sparcv9") + return sparcv9; if (Name == "systemz") return systemz; if (Name == "tce") @@ -180,7 +189,7 @@ Triple::ArchType Triple::getArchTypeForDarwinArchName(StringRef Str) { return Triple::UnknownArch; } -// Returns architecture name that is unsderstood by the target assembler. +// Returns architecture name that is understood by the target assembler. const char *Triple::getArchNameForAssembler() { if (getOS() != Triple::Darwin && getVendor() != Triple::Apple) return NULL; @@ -194,6 +203,8 @@ const char *Triple::getArchNameForAssembler() { return "ppc"; if (Str == "powerpc64") return "ppc64"; + if (Str == "mblaze" || Str == "microblaze") + return "mblaze"; if (Str == "arm") return "arm"; if (Str == "armv4t" || Str == "thumbv4t") @@ -230,6 +241,8 @@ void Triple::Parse() const { Arch = ppc; else if ((ArchName == "powerpc64") || (ArchName == "ppu")) Arch = ppc64; + else if (ArchName == "mblaze") + Arch = mblaze; else if (ArchName == "arm" || ArchName.startswith("armv") || ArchName == "xscale") @@ -250,6 +263,8 @@ void Triple::Parse() const { Arch = mipsel; else if (ArchName == "sparc") Arch = sparc; + else if (ArchName == "sparcv9") + Arch = sparcv9; else if (ArchName == "s390x") Arch = systemz; else if (ArchName == "tce")