[llvm-commits] [PATCH] [PATCH] Complete ARM v6m, v7em, and v7m backend support
Quentin Colombet
qcolombet at apple.com
Mon Jan 14 10:58:22 PST 2013
Hi chandlerc,
Hi,
The attached patch completes the existing support of ARM v6m, v7m, and v7em, i.e., respectively cortex-m0, cortex-m3, and cortex-m4 on the backend side.
The patch consists in adding new subtype values for the MachO format and use them when the related triple are set.
Chandler, I know you told me to directly commit these kind of simple patches, but I'd prefer to have an approval before committing, since I'm touching a part I've never touched before.
Thanks for the feedbacks.
Cheers,
Quentin
http://llvm-reviews.chandlerc.com/D296
Files:
include/llvm/Object/MachOFormat.h
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
Index: include/llvm/Object/MachOFormat.h
===================================================================
--- include/llvm/Object/MachOFormat.h
+++ include/llvm/Object/MachOFormat.h
@@ -64,7 +64,10 @@
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.
Index: lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
===================================================================
--- lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
+++ lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
@@ -672,12 +672,21 @@
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D296.1.patch
Type: text/x-patch
Size: 1888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130114/0d1e1644/attachment.bin>
More information about the llvm-commits
mailing list