From: Quentin Colombet Date: Mon, 14 Jan 2013 21:07:43 +0000 (+0000) Subject: Complete the existing support of ARM v6m, v7m, and v7em, i.e., respectively cortex... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=398db9368d72d1d60d40b2e18c16ca2c14aa7f39;p=oota-llvm.git Complete the existing support of ARM v6m, v7m, and v7em, i.e., respectively cortex-m0, cortex-m3, and cortex-m4 on the backend side. Adds new subtype values for the MachO format and use them when the related triple are set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172472 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Object/MachOFormat.h b/include/llvm/Object/MachOFormat.h index a17d58dae23..001cb6540af 100644 --- a/include/llvm/Object/MachOFormat.h +++ b/include/llvm/Object/MachOFormat.h @@ -64,7 +64,10 @@ namespace mach { CSARM_V7 = 9, CSARM_V7F = 10, CSARM_V7S = 11, - CSARM_V7K = 12 + CSARM_V7K = 12, + CSARM_V6M = 14, + CSARM_V7M = 15, + CSARM_V7EM = 16 }; /// \brief PowerPC Machine Subtypes. diff --git a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp index 1f1b334ea42..415dee31215 100644 --- a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp +++ b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp @@ -672,12 +672,21 @@ MCAsmBackend *llvm::createARMAsmBackend(const Target &T, StringRef TT, StringRef else if (TheTriple.getArchName() == "armv6" || TheTriple.getArchName() == "thumbv6") return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V6); + else if (TheTriple.getArchName() == "armv6m" || + TheTriple.getArchName() == "thumbv6m") + return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V6M); + else if (TheTriple.getArchName() == "armv7em" || + TheTriple.getArchName() == "thumbv7em") + return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V7EM); else if (TheTriple.getArchName() == "armv7f" || TheTriple.getArchName() == "thumbv7f") return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V7F); else if (TheTriple.getArchName() == "armv7k" || TheTriple.getArchName() == "thumbv7k") return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V7K); + else if (TheTriple.getArchName() == "armv7m" || + TheTriple.getArchName() == "thumbv7m") + return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V7M); else if (TheTriple.getArchName() == "armv7s" || TheTriple.getArchName() == "thumbv7s") return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V7S);