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
This commit is contained in:
Quentin Colombet 2013-01-14 21:07:43 +00:00
parent b398cae1e5
commit 398db9368d
2 changed files with 13 additions and 1 deletions

View File

@ -64,7 +64,10 @@ namespace mach {
CSARM_V7 = 9, CSARM_V7 = 9,
CSARM_V7F = 10, CSARM_V7F = 10,
CSARM_V7S = 11, CSARM_V7S = 11,
CSARM_V7K = 12 CSARM_V7K = 12,
CSARM_V6M = 14,
CSARM_V7M = 15,
CSARM_V7EM = 16
}; };
/// \brief PowerPC Machine Subtypes. /// \brief PowerPC Machine Subtypes.

View File

@ -672,12 +672,21 @@ MCAsmBackend *llvm::createARMAsmBackend(const Target &T, StringRef TT, StringRef
else if (TheTriple.getArchName() == "armv6" || else if (TheTriple.getArchName() == "armv6" ||
TheTriple.getArchName() == "thumbv6") TheTriple.getArchName() == "thumbv6")
return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V6); 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" || else if (TheTriple.getArchName() == "armv7f" ||
TheTriple.getArchName() == "thumbv7f") TheTriple.getArchName() == "thumbv7f")
return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V7F); return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V7F);
else if (TheTriple.getArchName() == "armv7k" || else if (TheTriple.getArchName() == "armv7k" ||
TheTriple.getArchName() == "thumbv7k") TheTriple.getArchName() == "thumbv7k")
return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V7K); 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" || else if (TheTriple.getArchName() == "armv7s" ||
TheTriple.getArchName() == "thumbv7s") TheTriple.getArchName() == "thumbv7s")
return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V7S); return new DarwinARMAsmBackend(T, TT, object::mach::CSARM_V7S);