<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Hi Michael,</p>
<p><br>
</p>
<p>Thanks for letting me know. Would you mind doing the review? <a href="https://reviews.llvm.org/D29380" class="OWAAutoLink">https://reviews.llvm.org/D29380</a></p>
<p><br>
</p>
<p>Thanks,</p>
<p>sam</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Sam Parker</p>
<p>Software Engineer, Compilation Tools</p>
<p>Development Solutions Group</p>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Michael Kuperstein <mkuper@google.com><br>
<b>Sent:</b> 31 January 2017 22:55:58<br>
<b>To:</b> Sam Parker<br>
<b>Cc:</b> llvm-commits<br>
<b>Subject:</b> Re: [llvm] r292366 - [ARM] Create objdump subtarget from build attrs</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi Sam,
<div><br>
</div>
<div>I just noticed (on a clean-enough rebuild :-) ) I'm getting a warning from this on GCC 4.8:</div>
<div><br>
</div>
<div>
<div>../unittests/Support/ARMAttributeParser.cpp: In function ‘bool testBuildAttr(unsigned int, unsigned int, unsigned int, unsigned int)’:</div>
<div>../unittests/Support/ARMAttributeParser.cpp:34:52: warning: cast from type ‘const char*’ to type ‘uint8_t* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]</div>
<div> ArrayRef<uint8_t> Bytes((uint8_t*)OS.str().c_str(), OS.str().size());</div>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div> Michael</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jan 18, 2017 at 5:52 AM, Sam Parker via llvm-commits
<span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: sam_parker<br>
Date: Wed Jan 18 07:52:12 2017<br>
New Revision: 292366<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=292366&view=rev" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project?rev=292366&view=rev</a><br>
Log:<br>
[ARM] Create objdump subtarget from build attrs<br>
<br>
Enable an ELFObjectFile to read the its arm build attributes to<br>
produce a target triple with a specific ARM architecture.<br>
llvm-objdump now uses this functionality to automatically produce<br>
a more accurate target.<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D28769" rel="noreferrer" target="_blank">
https://reviews.llvm.org/<wbr>D28769</a><br>
<br>
Added:<br>
llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5t-subarch.s<br>
llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5te-subarch.s<br>
llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5tej-subarch.s<br>
llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6-subarch.s<br>
llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6k-subarch.s<br>
llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6m-subarch.s<br>
llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6t2-subarch.s<br>
llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v7m-subarch.s<br>
llvm/trunk/unittests/Support/<wbr>ARMAttributeParser.cpp<br>
Modified:<br>
llvm/trunk/include/llvm/<wbr>Object/ELFObjectFile.h<br>
llvm/trunk/include/llvm/<wbr>Object/ObjectFile.h<br>
llvm/trunk/include/llvm/<wbr>Support/ARMAttributeParser.h<br>
llvm/trunk/include/llvm/<wbr>Support/ARMBuildAttributes.h<br>
llvm/trunk/lib/Object/<wbr>ELFObjectFile.cpp<br>
llvm/trunk/lib/Support/<wbr>ARMAttributeParser.cpp<br>
llvm/trunk/lib/Target/ARM/<wbr>ARMAsmPrinter.cpp<br>
llvm/trunk/tools/llvm-objdump/<wbr>llvm-objdump.cpp<br>
llvm/trunk/tools/llvm-readobj/<wbr>ELFDumper.cpp<br>
llvm/trunk/unittests/Support/<wbr>CMakeLists.txt<br>
<br>
Modified: llvm/trunk/include/llvm/<wbr>Object/ELFObjectFile.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELFObjectFile.h?rev=292366&r1=292365&r2=292366&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/include/<wbr>llvm/Object/ELFObjectFile.h?<wbr>rev=292366&r1=292365&r2=<wbr>292366&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/include/llvm/<wbr>Object/ELFObjectFile.h (original)<br>
+++ llvm/trunk/include/llvm/<wbr>Object/ELFObjectFile.h Wed Jan 18 07:52:12 2017<br>
@@ -26,6 +26,7 @@<br>
#include "llvm/Object/Error.h"<br>
#include "llvm/Object/ObjectFile.h"<br>
#include "llvm/Object/SymbolicFile.h"<br>
+#include "llvm/Support/<wbr>ARMAttributeParser.h"<br>
#include "llvm/Support/Casting.h"<br>
#include "llvm/Support/ELF.h"<br>
#include "llvm/Support/Endian.h"<br>
@@ -72,6 +73,8 @@ public:<br>
static inline bool classof(const Binary *v) { return v->isELF(); }<br>
<br>
SubtargetFeatures getFeatures() const override;<br>
+<br>
+ void setARMSubArch(Triple &TheTriple) const override;<br>
};<br>
<br>
class ELFSectionRef : public SectionRef {<br>
@@ -356,6 +359,28 @@ public:<br>
return std::error_code();<br>
}<br>
<br>
+ std::error_code getBuildAttributes(<wbr>ARMAttributeParser &Attributes) const override {<br>
+ auto SectionsOrErr = EF.sections();<br>
+ if (!SectionsOrErr)<br>
+ return errorToErrorCode(<wbr>SectionsOrErr.takeError());<br>
+<br>
+ for (const Elf_Shdr &Sec : *SectionsOrErr) {<br>
+ if (Sec.sh_type == ELF::SHT_ARM_ATTRIBUTES) {<br>
+ auto ErrorOrContents = EF.getSectionContents(&Sec);<br>
+ if (!ErrorOrContents)<br>
+ return errorToErrorCode(<wbr>ErrorOrContents.takeError());<br>
+<br>
+ auto Contents = ErrorOrContents.get();<br>
+ if (Contents[0] != ARMBuildAttrs::Format_Version || Contents.size() == 1)<br>
+ return std::error_code();<br>
+<br>
+ Attributes.Parse(Contents, ELFT::TargetEndianness == support::little);<br>
+ break;<br>
+ }<br>
+ }<br>
+ return std::error_code();<br>
+ }<br>
+<br>
const ELFFile<ELFT> *getELFFile() const { return &EF; }<br>
<br>
bool isDyldType() const { return isDyldELFObject; }<br>
<br>
Modified: llvm/trunk/include/llvm/<wbr>Object/ObjectFile.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ObjectFile.h?rev=292366&r1=292365&r2=292366&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/include/<wbr>llvm/Object/ObjectFile.h?rev=<wbr>292366&r1=292365&r2=292366&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/include/llvm/<wbr>Object/ObjectFile.h (original)<br>
+++ llvm/trunk/include/llvm/<wbr>Object/ObjectFile.h Wed Jan 18 07:52:12 2017<br>
@@ -24,6 +24,8 @@<br>
#include <cstring><br>
<br>
namespace llvm {<br>
+class ARMAttributeParser;<br>
+<br>
namespace object {<br>
<br>
class ObjectFile;<br>
@@ -265,6 +267,7 @@ public:<br>
virtual StringRef getFileFormatName() const = 0;<br>
virtual /* Triple::ArchType */ unsigned getArch() const = 0;<br>
virtual SubtargetFeatures getFeatures() const = 0;<br>
+ virtual void setARMSubArch(Triple &TheTriple) const { }<br>
<br>
/// Returns platform-specific object flags, if any.<br>
virtual std::error_code getPlatformFlags(unsigned &Result) const {<br>
@@ -272,6 +275,11 @@ public:<br>
return object_error::invalid_file_<wbr>type;<br>
}<br>
<br>
+ virtual std::error_code<br>
+ getBuildAttributes(<wbr>ARMAttributeParser &Attributes) const {<br>
+ return std::error_code();<br>
+ }<br>
+<br>
/// True if this is a relocatable object (.o/.obj).<br>
virtual bool isRelocatableObject() const = 0;<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/<wbr>Support/ARMAttributeParser.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ARMAttributeParser.h?rev=292366&r1=292365&r2=292366&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/include/<wbr>llvm/Support/<wbr>ARMAttributeParser.h?rev=<wbr>292366&r1=292365&r2=292366&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/include/llvm/<wbr>Support/ARMAttributeParser.h (original)<br>
+++ llvm/trunk/include/llvm/<wbr>Support/ARMAttributeParser.h Wed Jan 18 07:52:12 2017<br>
@@ -13,11 +13,15 @@<br>
#include "ARMBuildAttributes.h"<br>
#include "ScopedPrinter.h"<br>
<br>
+#include <map><br>
+<br>
namespace llvm {<br>
class StringRef;<br>
<br>
class ARMAttributeParser {<br>
- ScopedPrinter &SW;<br>
+ ScopedPrinter *SW;<br>
+<br>
+ std::map<unsigned, unsigned> Attributes;<br>
<br>
struct DisplayHandler {<br>
ARMBuildAttrs::AttrType Attribute;<br>
@@ -115,9 +119,19 @@ class ARMAttributeParser {<br>
SmallVectorImpl<uint8_t> &IndexList);<br>
void ParseSubsection(const uint8_t *Data, uint32_t Length);<br>
public:<br>
- ARMAttributeParser(<wbr>ScopedPrinter &SW) : SW(SW) {}<br>
+ ARMAttributeParser(<wbr>ScopedPrinter *SW) : SW(SW) {}<br>
+<br>
+ ARMAttributeParser() : SW(nullptr) { }<br>
+<br>
+ void Parse(ArrayRef<uint8_t> Section, bool isLittle);<br>
+<br>
+ bool hasAttribute(unsigned Tag) const {<br>
+ return Attributes.count(Tag);<br>
+ }<br>
<br>
- void Parse(ArrayRef<uint8_t> Section);<br>
+ unsigned getAttributeValue(unsigned Tag) const {<br>
+ return Attributes.find(Tag)->second;<br>
+ }<br>
};<br>
<br>
}<br>
<br>
Modified: llvm/trunk/include/llvm/<wbr>Support/ARMBuildAttributes.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ARMBuildAttributes.h?rev=292366&r1=292365&r2=292366&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/include/<wbr>llvm/Support/<wbr>ARMBuildAttributes.h?rev=<wbr>292366&r1=292365&r2=292366&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/include/llvm/<wbr>Support/ARMBuildAttributes.h (original)<br>
+++ llvm/trunk/include/llvm/<wbr>Support/ARMBuildAttributes.h Wed Jan 18 07:52:12 2017<br>
@@ -176,14 +176,25 @@ enum {<br>
WCharWidth2Bytes = 2, // sizeof(wchar_t) == 2<br>
WCharWidth4Bytes = 4, // sizeof(wchar_t) == 4<br>
<br>
+ // Tag_ABI_align_needed, (=24), uleb128<br>
+ Align8Byte = 1,<br>
+ Align4Byte = 2,<br>
+ AlignReserved = 3,<br>
+<br>
+ // Tag_ABI_align_needed, (=25), uleb128<br>
+ AlignNotPreserved = 0,<br>
+ AlignPreserve8Byte = 1,<br>
+ AlignPreserveAll = 2,<br>
+<br>
// Tag_ABI_FP_denormal, (=20), uleb128<br>
PositiveZero = 0,<br>
IEEEDenormals = 1,<br>
PreserveFPSign = 2, // sign when flushed-to-zero is preserved<br>
<br>
// Tag_ABI_FP_number_model, (=23), uleb128<br>
+ AllowIEEENormal = 1,<br>
AllowRTABI = 2, // numbers, infinities, and one quiet NaN (see [RTABI])<br>
- AllowIEE754 = 3, // this code to use all the IEEE 754-defined FP encodings<br>
+ AllowIEEE754 = 3, // this code to use all the IEEE 754-defined FP encodings<br>
<br>
// Tag_ABI_enum_size, (=26), uleb128<br>
EnumProhibited = 0, // The user prohibited the use of enums when building<br>
@@ -208,6 +219,7 @@ enum {<br>
<br>
// Tag_FP_16bit_format, (=38), uleb128<br>
FP16FormatIEEE = 1,<br>
+ FP16VFP3 = 2,<br>
<br>
// Tag_MPextension_use, (=42), uleb128<br>
AllowMP = 1, // Allow use of MP extensions<br>
<br>
Modified: llvm/trunk/lib/Object/<wbr>ELFObjectFile.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/ELFObjectFile.cpp?rev=292366&r1=292365&r2=292366&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/Object/<wbr>ELFObjectFile.cpp?rev=292366&<wbr>r1=292365&r2=292366&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Object/<wbr>ELFObjectFile.cpp (original)<br>
+++ llvm/trunk/lib/Object/<wbr>ELFObjectFile.cpp Wed Jan 18 07:52:12 2017<br>
@@ -122,4 +122,71 @@ SubtargetFeatures ELFObjectFileBase::get<br>
}<br>
}<br>
<br>
+// FIXME Encode from a tablegen description or target parser.<br>
+void ELFObjectFileBase::<wbr>setARMSubArch(Triple &TheTriple) const {<br>
+ if (TheTriple.getSubArch() != Triple::NoSubArch)<br>
+ return;<br>
+<br>
+ ARMAttributeParser Attributes;<br>
+ std::error_code EC = getBuildAttributes(Attributes)<wbr>;<br>
+ if (EC)<br>
+ return;<br>
+<br>
+ std::string Triple;<br>
+ // Default to ARM, but use the triple if it's been set.<br>
+ if (TheTriple.getArch() == Triple::thumb ||<br>
+ TheTriple.getArch() == Triple::thumbeb)<br>
+ Triple = "thumb";<br>
+ else<br>
+ Triple = "arm";<br>
+<br>
+ if (Attributes.hasAttribute(<wbr>ARMBuildAttrs::CPU_arch)) {<br>
+ switch(Attributes.<wbr>getAttributeValue(<wbr>ARMBuildAttrs::CPU_arch)) {<br>
+ case ARMBuildAttrs::v4:<br>
+ Triple += "v4";<br>
+ break;<br>
+ case ARMBuildAttrs::v4T:<br>
+ Triple += "v4t";<br>
+ break;<br>
+ case ARMBuildAttrs::v5T:<br>
+ Triple += "v5t";<br>
+ break;<br>
+ case ARMBuildAttrs::v5TE:<br>
+ Triple += "v5te";<br>
+ break;<br>
+ case ARMBuildAttrs::v5TEJ:<br>
+ Triple += "v5tej";<br>
+ break;<br>
+ case ARMBuildAttrs::v6:<br>
+ Triple += "v6";<br>
+ break;<br>
+ case ARMBuildAttrs::v6KZ:<br>
+ Triple += "v6kz";<br>
+ break;<br>
+ case ARMBuildAttrs::v6T2:<br>
+ Triple += "v6t2";<br>
+ break;<br>
+ case ARMBuildAttrs::v6K:<br>
+ Triple += "v6k";<br>
+ break;<br>
+ case ARMBuildAttrs::v7:<br>
+ Triple += "v7";<br>
+ break;<br>
+ case ARMBuildAttrs::v6_M:<br>
+ Triple += "v6m";<br>
+ break;<br>
+ case ARMBuildAttrs::v6S_M:<br>
+ Triple += "v6sm";<br>
+ break;<br>
+ case ARMBuildAttrs::v7E_M:<br>
+ Triple += "v7em";<br>
+ break;<br>
+ }<br>
+ }<br>
+ if (!isLittleEndian())<br>
+ Triple += "eb";<br>
+<br>
+ TheTriple.setArchName(Triple);<br>
+}<br>
+<br>
} // end namespace llvm<br>
<br>
Modified: llvm/trunk/lib/Support/<wbr>ARMAttributeParser.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ARMAttributeParser.cpp?rev=292366&r1=292365&r2=292366&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/<wbr>Support/ARMAttributeParser.<wbr>cpp?rev=292366&r1=292365&r2=<wbr>292366&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Support/<wbr>ARMAttributeParser.cpp (original)<br>
+++ llvm/trunk/lib/Support/<wbr>ARMAttributeParser.cpp Wed Jan 18 07:52:12 2017<br>
@@ -89,32 +89,43 @@ StringRef ARMAttributeParser::ParseStrin<br>
<br>
void ARMAttributeParser::<wbr>IntegerAttribute(AttrType Tag, const uint8_t *Data,<br>
uint32_t &Offset) {<br>
- SW.printNumber(ARMBuildAttrs::<wbr>AttrTypeAsString(Tag),<br>
- ParseInteger(Data, Offset));<br>
+<br>
+ uint64_t Value = ParseInteger(Data, Offset);<br>
+ Attributes.insert(std::make_<wbr>pair(Tag, Value));<br>
+<br>
+ if (SW)<br>
+ SW->printNumber(ARMBuildAttrs:<wbr>:AttrTypeAsString(Tag), Value);<br>
}<br>
<br>
void ARMAttributeParser::<wbr>StringAttribute(AttrType Tag, const uint8_t *Data,<br>
uint32_t &Offset) {<br>
StringRef TagName = ARMBuildAttrs::<wbr>AttrTypeAsString(Tag, /*TagPrefix*/false);<br>
+ StringRef ValueDesc = ParseString(Data, Offset);<br>
<br>
- DictScope AS(SW, "Attribute");<br>
- SW.printNumber("Tag", Tag);<br>
- if (!TagName.empty())<br>
- SW.printString("TagName", TagName);<br>
- SW.printString("Value", ParseString(Data, Offset));<br>
+ if (SW) {<br>
+ DictScope AS(*SW, "Attribute");<br>
+ SW->printNumber("Tag", Tag);<br>
+ if (!TagName.empty())<br>
+ SW->printString("TagName", TagName);<br>
+ SW->printString("Value", ValueDesc);<br>
+ }<br>
}<br>
<br>
void ARMAttributeParser::<wbr>PrintAttribute(unsigned Tag, unsigned Value,<br>
StringRef ValueDesc) {<br>
- StringRef TagName = ARMBuildAttrs::<wbr>AttrTypeAsString(Tag, /*TagPrefix*/false);<br>
+ Attributes.insert(std::make_<wbr>pair(Tag, Value));<br>
<br>
- DictScope AS(SW, "Attribute");<br>
- SW.printNumber("Tag", Tag);<br>
- SW.printNumber("Value", Value);<br>
- if (!TagName.empty())<br>
- SW.printString("TagName", TagName);<br>
- if (!ValueDesc.empty())<br>
- SW.printString("Description", ValueDesc);<br>
+ if (SW) {<br>
+ StringRef TagName = ARMBuildAttrs::<wbr>AttrTypeAsString(Tag,<br>
+ /*TagPrefix*/false);<br>
+ DictScope AS(*SW, "Attribute");<br>
+ SW->printNumber("Tag", Tag);<br>
+ SW->printNumber("Value", Value);<br>
+ if (!TagName.empty())<br>
+ SW->printString("TagName", TagName);<br>
+ if (!ValueDesc.empty())<br>
+ SW->printString("Description", ValueDesc);<br>
+ }<br>
}<br>
<br>
void ARMAttributeParser::CPU_arch(<wbr>AttrType Tag, const uint8_t *Data,<br>
@@ -449,20 +460,22 @@ void ARMAttributeParser::<wbr>compatibility(A<br>
uint64_t Integer = ParseInteger(Data, Offset);<br>
StringRef String = ParseString(Data, Offset);<br>
<br>
- DictScope AS(SW, "Attribute");<br>
- SW.printNumber("Tag", Tag);<br>
- SW.startLine() << "Value: " << Integer << ", " << String << '\n';<br>
- SW.printString("TagName", AttrTypeAsString(Tag, /*TagPrefix*/false));<br>
- switch (Integer) {<br>
- case 0:<br>
- SW.printString("Description", StringRef("No Specific Requirements"));<br>
- break;<br>
- case 1:<br>
- SW.printString("Description", StringRef("AEABI Conformant"));<br>
- break;<br>
- default:<br>
- SW.printString("Description", StringRef("AEABI Non-Conformant"));<br>
- break;<br>
+ if (SW) {<br>
+ DictScope AS(*SW, "Attribute");<br>
+ SW->printNumber("Tag", Tag);<br>
+ SW->startLine() << "Value: " << Integer << ", " << String << '\n';<br>
+ SW->printString("TagName", AttrTypeAsString(Tag, /*TagPrefix*/false));<br>
+ switch (Integer) {<br>
+ case 0:<br>
+ SW->printString("Description", StringRef("No Specific Requirements"));<br>
+ break;<br>
+ case 1:<br>
+ SW->printString("Description", StringRef("AEABI Conformant"));<br>
+ break;<br>
+ default:<br>
+ SW->printString("Description", StringRef("AEABI Non-Conformant"));<br>
+ break;<br>
+ }<br>
}<br>
}<br>
<br>
@@ -604,27 +617,33 @@ void ARMAttributeParser::<wbr>ParseAttributeL<br>
void ARMAttributeParser::<wbr>ParseSubsection(const uint8_t *Data, uint32_t Length) {<br>
uint32_t Offset = sizeof(uint32_t); /* SectionLength */<br>
<br>
- SW.printNumber("SectionLength"<wbr>, Length);<br>
-<br>
const char *VendorName = reinterpret_cast<const char*>(Data + Offset);<br>
size_t VendorNameLength = std::strlen(VendorName);<br>
- SW.printString("Vendor", StringRef(VendorName, VendorNameLength));<br>
Offset = Offset + VendorNameLength + 1;<br>
<br>
- if (StringRef(VendorName, VendorNameLength).lower() != "aeabi")<br>
+ if (SW) {<br>
+ SW->printNumber("<wbr>SectionLength", Length);<br>
+ SW->printString("Vendor", StringRef(VendorName, VendorNameLength));<br>
+ }<br>
+<br>
+ if (StringRef(VendorName, VendorNameLength).lower() != "aeabi") {<br>
return;<br>
+ }<br>
<br>
while (Offset < Length) {<br>
/// Tag_File | Tag_Section | Tag_Symbol uleb128:byte-size<br>
uint8_t Tag = Data[Offset];<br>
- SW.printEnum("Tag", Tag, makeArrayRef(TagNames));<br>
Offset = Offset + sizeof(Tag);<br>
<br>
uint32_t Size =<br>
*reinterpret_cast<const support::ulittle32_t*>(Data + Offset);<br>
- SW.printNumber("Size", Size);<br>
Offset = Offset + sizeof(Size);<br>
<br>
+ if (SW) {<br>
+ SW->printEnum("Tag", Tag, makeArrayRef(TagNames));<br>
+ SW->printNumber("Size", Size);<br>
+ }<br>
+<br>
if (Size > Length) {<br>
errs() << "subsection length greater than section length\n";<br>
return;<br>
@@ -651,31 +670,38 @@ void ARMAttributeParser::<wbr>ParseSubsection<br>
return;<br>
}<br>
<br>
- DictScope ASS(SW, ScopeName);<br>
-<br>
- if (!Indicies.empty())<br>
- SW.printList(IndexName, Indicies);<br>
-<br>
- ParseAttributeList(Data, Offset, Length);<br>
+ if (SW) {<br>
+ DictScope ASS(*SW, ScopeName);<br>
+ if (!Indicies.empty())<br>
+ SW->printList(IndexName, Indicies);<br>
+ ParseAttributeList(Data, Offset, Length);<br>
+ } else {<br>
+ ParseAttributeList(Data, Offset, Length);<br>
+ }<br>
}<br>
}<br>
<br>
-void ARMAttributeParser::Parse(<wbr>ArrayRef<uint8_t> Section) {<br>
+void ARMAttributeParser::Parse(<wbr>ArrayRef<uint8_t> Section, bool isLittle) {<br>
size_t Offset = 1;<br>
unsigned SectionNumber = 0;<br>
<br>
while (Offset < Section.size()) {<br>
- uint32_t SectionLength =<br>
- *reinterpret_cast<const support::ulittle32_t*>(<wbr>Section.data() + Offset);<br>
-<br>
- SW.startLine() << "Section " << ++SectionNumber << " {\n";<br>
- SW.indent();<br>
+ uint32_t SectionLength = isLittle ?<br>
+ support::endian::read32le(<wbr>Section.data() + Offset) :<br>
+ support::endian::read32be(<wbr>Section.data() + Offset);<br>
+<br>
+ if (SW) {<br>
+ SW->startLine() << "Section " << ++SectionNumber << " {\n";<br>
+ SW->indent();<br>
+ }<br>
<br>
ParseSubsection(Section.data() + Offset, SectionLength);<br>
Offset = Offset + SectionLength;<br>
<br>
- SW.unindent();<br>
- SW.startLine() << "}\n";<br>
+ if (SW) {<br>
+ SW->unindent();<br>
+ SW->startLine() << "}\n";<br>
+ }<br>
}<br>
}<br>
}<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/<wbr>ARMAsmPrinter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=292366&r1=292365&r2=292366&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/Target/<wbr>ARM/ARMAsmPrinter.cpp?rev=<wbr>292366&r1=292365&r2=292366&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Target/ARM/<wbr>ARMAsmPrinter.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/<wbr>ARMAsmPrinter.cpp Wed Jan 18 07:52:12 2017<br>
@@ -841,7 +841,7 @@ void ARMAsmPrinter::emitAttributes(<wbr>) {<br>
ARMBuildAttrs::Allowed);<br>
else<br>
ATS.emitAttribute(<wbr>ARMBuildAttrs::ABI_FP_number_<wbr>model,<br>
- ARMBuildAttrs::AllowIEE754);<br>
+ ARMBuildAttrs::AllowIEEE754);<br>
<br>
if (STI.allowsUnalignedMem())<br>
ATS.emitAttribute(<wbr>ARMBuildAttrs::CPU_unaligned_<wbr>access,<br>
<br>
Added: llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5t-subarch.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/ARM/v5t-subarch.s?rev=292366&view=auto" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/tools/<wbr>llvm-objdump/ARM/v5t-subarch.<wbr>s?rev=292366&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5t-subarch.s (added)<br>
+++ llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5t-subarch.s Wed Jan 18 07:52:12 2017<br>
@@ -0,0 +1,10 @@<br>
+@ RUN: llvm-mc < %s -triple armv5t-elf -filetype=obj | llvm-objdump -triple=arm -d - | FileCheck %s<br>
+<br>
+.arch armv5t<br>
+<br>
+clz:<br>
+clz r0, r1<br>
+<br>
+@ CHECK-LABEL: clz<br>
+@ CHECK: 11 0f 6f e1<br>
+<br>
<br>
Added: llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5te-subarch.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/ARM/v5te-subarch.s?rev=292366&view=auto" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/tools/<wbr>llvm-objdump/ARM/v5te-subarch.<wbr>s?rev=292366&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5te-subarch.s (added)<br>
+++ llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5te-subarch.s Wed Jan 18 07:52:12 2017<br>
@@ -0,0 +1,10 @@<br>
+@ RUN: llvm-mc < %s -triple armv5te-elf -filetype=obj | llvm-objdump -triple=arm -d - | FileCheck %s<br>
+<br>
+.arch armv5te<br>
+<br>
+strd:<br>
+strd r0, r1, [r2, +r3]<br>
+<br>
+@ CHECK-LABEL strd<br>
+@ CHECK: f3 00 82 e1 strd r0, r1, [r2, r3]<br>
+<br>
<br>
Added: llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5tej-subarch.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/ARM/v5tej-subarch.s?rev=292366&view=auto" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/tools/<wbr>llvm-objdump/ARM/v5tej-<wbr>subarch.s?rev=292366&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5tej-subarch.s (added)<br>
+++ llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v5tej-subarch.s Wed Jan 18 07:52:12 2017<br>
@@ -0,0 +1,7 @@<br>
+@ RUN: llvm-mc < %s -triple armv5tej-elf -filetype=obj | llvm-objdump -triple=arm -d - | FileCheck %s<br>
+<br>
+bxj:<br>
+bxj r0<br>
+<br>
+@ CHECK-LABEL: bxj<br>
+@ CHECK: 20 ff 2f e1 bxj r0<br>
<br>
Added: llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6-subarch.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/ARM/v6-subarch.s?rev=292366&view=auto" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/tools/<wbr>llvm-objdump/ARM/v6-subarch.s?<wbr>rev=292366&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6-subarch.s (added)<br>
+++ llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6-subarch.s Wed Jan 18 07:52:12 2017<br>
@@ -0,0 +1,9 @@<br>
+@ RUN: llvm-mc < %s -triple armv6-elf -filetype=obj | llvm-objdump -triple=arm -d - | FileCheck %s<br>
+<br>
+.arch armv6<br>
+<br>
+umaal:<br>
+umaal r0, r1, r2, r3<br>
+<br>
+@ CHECK-LABEL:umaal<br>
+@ CHECK: 92 03 41 e0 umaal r0, r1, r2, r3<br>
<br>
Added: llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6k-subarch.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/ARM/v6k-subarch.s?rev=292366&view=auto" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/tools/<wbr>llvm-objdump/ARM/v6k-subarch.<wbr>s?rev=292366&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6k-subarch.s (added)<br>
+++ llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6k-subarch.s Wed Jan 18 07:52:12 2017<br>
@@ -0,0 +1,9 @@<br>
+@ RUN: llvm-mc < %s -triple armv6k-elf -filetype=obj | llvm-objdump -triple=arm -d - | FileCheck %s<br>
+<br>
+.arch armv6k<br>
+<br>
+clrex:<br>
+clrex<br>
+<br>
+@ CHECK-LABEL: clrex<br>
+@ CHECK: 1f f0 7f f5 clrex<br>
<br>
Added: llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6m-subarch.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/ARM/v6m-subarch.s?rev=292366&view=auto" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/tools/<wbr>llvm-objdump/ARM/v6m-subarch.<wbr>s?rev=292366&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6m-subarch.s (added)<br>
+++ llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6m-subarch.s Wed Jan 18 07:52:12 2017<br>
@@ -0,0 +1,9 @@<br>
+@ RUN: llvm-mc < %s -triple armv6m-elf -filetype=obj | llvm-objdump -triple=thumb -d - | FileCheck %s<br>
+<br>
+.arch armv6m<br>
+<br>
+dmb:<br>
+dmb<br>
+<br>
+@ CHECK-LABEL: dmb<br>
+@ CHECK: bf f3 5f 8f dmb sy<br>
<br>
Added: llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6t2-subarch.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/ARM/v6t2-subarch.s?rev=292366&view=auto" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/tools/<wbr>llvm-objdump/ARM/v6t2-subarch.<wbr>s?rev=292366&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6t2-subarch.s (added)<br>
+++ llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v6t2-subarch.s Wed Jan 18 07:52:12 2017<br>
@@ -0,0 +1,10 @@<br>
+@ RUN: llvm-mc < %s -triple armv6t2-elf -filetype=obj | llvm-objdump -triple=thumb -d - | FileCheck %s<br>
+<br>
+.arch armv6t2<br>
+<br>
+.thumb<br>
+umaalt2:<br>
+umaal r0, r1, r2, r3<br>
+<br>
+@ CHECK-LABEL: umaalt2<br>
+@ CHECK: e2 fb 63 01 umaal r0, r1, r2, r3<br>
<br>
Added: llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v7m-subarch.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/ARM/v7m-subarch.s?rev=292366&view=auto" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/tools/<wbr>llvm-objdump/ARM/v7m-subarch.<wbr>s?rev=292366&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v7m-subarch.s (added)<br>
+++ llvm/trunk/test/tools/llvm-<wbr>objdump/ARM/v7m-subarch.s Wed Jan 18 07:52:12 2017<br>
@@ -0,0 +1,10 @@<br>
+@ RUN: llvm-mc < %s -triple armv7m-elf -filetype=obj | llvm-objdump -triple=thumb -d - | FileCheck %s<br>
+<br>
+.arch armv7m<br>
+<br>
+umlal:<br>
+umlal r0, r1, r2, r3<br>
+<br>
+@ CHECK-LABEL: umlal<br>
+@ CHECK: e2 fb 03 01 umlal r0, r1, r2, r3<br>
+<br>
<br>
Modified: llvm/trunk/tools/llvm-objdump/<wbr>llvm-objdump.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=292366&r1=292365&r2=292366&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/tools/llvm-<wbr>objdump/llvm-objdump.cpp?rev=<wbr>292366&r1=292365&r2=292366&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/tools/llvm-objdump/<wbr>llvm-objdump.cpp (original)<br>
+++ llvm/trunk/tools/llvm-objdump/<wbr>llvm-objdump.cpp Wed Jan 18 07:52:12 2017<br>
@@ -357,7 +357,16 @@ static const Target *getTarget(const Obj<br>
llvm::Triple TheTriple("unknown-unknown-<wbr>unknown");<br>
if (TripleName.empty()) {<br>
if (Obj) {<br>
- TheTriple.setArch(Triple::<wbr>ArchType(Obj->getArch()));<br>
+ auto Arch = Obj->getArch();<br>
+ TheTriple.setArch(Triple::<wbr>ArchType(Arch));<br>
+<br>
+ // For ARM targets, try to use the build attributes to build determine<br>
+ // the build target. Target features are also added, but later during<br>
+ // disassembly.<br>
+ if (Arch == Triple::arm || Arch == Triple::armeb) {<br>
+ Obj->setARMSubArch(TheTriple);<br>
+ }<br>
+<br>
// TheTriple defaults to ELF, and COFF doesn't have an environment:<br>
// the best we can do here is indicate that it is mach-o.<br>
if (Obj->isMachO())<br>
@@ -369,8 +378,16 @@ static const Target *getTarget(const Obj<br>
TheTriple.setTriple("thumbv7-<wbr>windows");<br>
}<br>
}<br>
- } else<br>
+ } else {<br>
TheTriple.setTriple(Triple::<wbr>normalize(TripleName));<br>
+ // Use the triple, but also try to combine with ARM build attributes.<br>
+ if (Obj) {<br>
+ auto Arch = Obj->getArch();<br>
+ if (Arch == Triple::arm || Arch == Triple::armeb) {<br>
+ Obj->setARMSubArch(TheTriple);<br>
+ }<br>
+ }<br>
+ }<br>
<br>
// Get the target specific parser.<br>
std::string Error;<br>
<br>
Modified: llvm/trunk/tools/llvm-readobj/<wbr>ELFDumper.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=292366&r1=292365&r2=292366&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/tools/llvm-<wbr>readobj/ELFDumper.cpp?rev=<wbr>292366&r1=292365&r2=292366&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/tools/llvm-readobj/<wbr>ELFDumper.cpp (original)<br>
+++ llvm/trunk/tools/llvm-readobj/<wbr>ELFDumper.cpp Wed Jan 18 07:52:12 2017<br>
@@ -1892,7 +1892,7 @@ template <> void ELFDumper<ELFType<suppo<br>
if (Contents.size() == 1)<br>
continue;<br>
<br>
- ARMAttributeParser(W).Parse(<wbr>Contents);<br>
+ ARMAttributeParser(&W).Parse(<wbr>Contents, true);<br>
}<br>
}<br>
}<br>
<br>
Added: llvm/trunk/unittests/Support/<wbr>ARMAttributeParser.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/ARMAttributeParser.cpp?rev=292366&view=auto" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/unittests/<wbr>Support/ARMAttributeParser.<wbr>cpp?rev=292366&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/unittests/Support/<wbr>ARMAttributeParser.cpp (added)<br>
+++ llvm/trunk/unittests/Support/<wbr>ARMAttributeParser.cpp Wed Jan 18 07:52:12 2017<br>
@@ -0,0 +1,384 @@<br>
+#include "llvm/Support/<wbr>ARMBuildAttributes.h"<br>
+#include "llvm/Support/<wbr>ARMAttributeParser.h"<br>
+#include "llvm/Support/LEB128.h"<br>
+#include "gtest/gtest.h"<br>
+#include <string><br>
+<br>
+using namespace llvm;<br>
+<br>
+struct AttributeSection {<br>
+ unsigned Tag;<br>
+ unsigned Value;<br>
+<br>
+ AttributeSection(unsigned tag, unsigned value) : Tag(tag), Value(value) { }<br>
+<br>
+ void write(raw_ostream &OS) {<br>
+ OS.flush();<br>
+ // length = length + "aeabi\0" + TagFile + ByteSize + Tag + Value;<br>
+ // length = 17 bytes<br>
+<br>
+ OS << 'A' << (uint8_t)17 << (uint8_t)0 << (uint8_t)0 << (uint8_t)0;<br>
+ OS << "aeabi" << '\0';<br>
+ OS << (uint8_t)1 << (uint8_t)7 << (uint8_t)0 << (uint8_t)0 << (uint8_t)0;<br>
+ OS << (uint8_t)Tag << (uint8_t)Value;<br>
+<br>
+ }<br>
+};<br>
+<br>
+bool testBuildAttr(unsigned Tag, unsigned Value,<br>
+ unsigned ExpectedTag, unsigned ExpectedValue) {<br>
+ std::string buffer;<br>
+ raw_string_ostream OS(buffer);<br>
+ AttributeSection Section(Tag, Value);<br>
+ Section.write(OS);<br>
+ ArrayRef<uint8_t> Bytes((uint8_t*)OS.str().c_<wbr>str(), OS.str().size());<br>
+<br>
+ ARMAttributeParser Parser;<br>
+ Parser.Parse(Bytes, true);<br>
+<br>
+ return (Parser.hasAttribute(<wbr>ExpectedTag) &&<br>
+ Parser.getAttributeValue(<wbr>ExpectedTag) == ExpectedValue);<br>
+}<br>
+<br>
+bool testTagString(unsigned Tag, const char *name) {<br>
+ return ARMBuildAttrs::<wbr>AttrTypeAsString(Tag).str() == name;<br>
+}<br>
+<br>
+TEST(CPUArchBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(6, "Tag_CPU_arch"));<br>
+<br>
+ EXPECT_TRUE(testBuildAttr(6, 0, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::Pre_v4));<br>
+ EXPECT_TRUE(testBuildAttr(6, 1, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v4));<br>
+ EXPECT_TRUE(testBuildAttr(6, 2, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v4T));<br>
+ EXPECT_TRUE(testBuildAttr(6, 3, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v5T));<br>
+ EXPECT_TRUE(testBuildAttr(6, 4, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v5TE));<br>
+ EXPECT_TRUE(testBuildAttr(6, 5, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v5TEJ));<br>
+ EXPECT_TRUE(testBuildAttr(6, 6, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v6));<br>
+ EXPECT_TRUE(testBuildAttr(6, 7, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v6KZ));<br>
+ EXPECT_TRUE(testBuildAttr(6, 8, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v6T2));<br>
+ EXPECT_TRUE(testBuildAttr(6, 9, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v6K));<br>
+ EXPECT_TRUE(testBuildAttr(6, 10, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v7));<br>
+ EXPECT_TRUE(testBuildAttr(6, 11, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v6_M));<br>
+ EXPECT_TRUE(testBuildAttr(6, 12, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v6S_M));<br>
+ EXPECT_TRUE(testBuildAttr(6, 13, ARMBuildAttrs::CPU_arch,<br>
+ ARMBuildAttrs::v7E_M));<br>
+}<br>
+<br>
+TEST(CPUArchProfileBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(7, "Tag_CPU_arch_profile"));<br>
+ EXPECT_TRUE(testBuildAttr(7, 'A', ARMBuildAttrs::CPU_arch_<wbr>profile,<br>
+ ARMBuildAttrs::<wbr>ApplicationProfile));<br>
+ EXPECT_TRUE(testBuildAttr(7, 'R', ARMBuildAttrs::CPU_arch_<wbr>profile,<br>
+ ARMBuildAttrs::<wbr>RealTimeProfile));<br>
+ EXPECT_TRUE(testBuildAttr(7, 'M', ARMBuildAttrs::CPU_arch_<wbr>profile,<br>
+ ARMBuildAttrs::<wbr>MicroControllerProfile));<br>
+ EXPECT_TRUE(testBuildAttr(7, 'S', ARMBuildAttrs::CPU_arch_<wbr>profile,<br>
+ ARMBuildAttrs::SystemProfile))<wbr>;<br>
+}<br>
+<br>
+TEST(ARMISABuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(8, "Tag_ARM_ISA_use"));<br>
+ EXPECT_TRUE(testBuildAttr(8, 0, ARMBuildAttrs::ARM_ISA_use,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(8, 1, ARMBuildAttrs::ARM_ISA_use,<br>
+ ARMBuildAttrs::Allowed));<br>
+}<br>
+<br>
+TEST(ThumbISABuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(9, "Tag_THUMB_ISA_use"));<br>
+ EXPECT_TRUE(testBuildAttr(9, 0, ARMBuildAttrs::THUMB_ISA_use,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(9, 1, ARMBuildAttrs::THUMB_ISA_use,<br>
+ ARMBuildAttrs::Allowed));<br>
+}<br>
+<br>
+TEST(FPArchBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(10, "Tag_FP_arch"));<br>
+ EXPECT_TRUE(testBuildAttr(10, 0, ARMBuildAttrs::FP_arch,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(10, 1, ARMBuildAttrs::FP_arch,<br>
+ ARMBuildAttrs::Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(10, 2, ARMBuildAttrs::FP_arch,<br>
+ ARMBuildAttrs::AllowFPv2));<br>
+ EXPECT_TRUE(testBuildAttr(10, 3, ARMBuildAttrs::FP_arch,<br>
+ ARMBuildAttrs::AllowFPv3A));<br>
+ EXPECT_TRUE(testBuildAttr(10, 4, ARMBuildAttrs::FP_arch,<br>
+ ARMBuildAttrs::AllowFPv3B));<br>
+ EXPECT_TRUE(testBuildAttr(10, 5, ARMBuildAttrs::FP_arch,<br>
+ ARMBuildAttrs::AllowFPv4A));<br>
+ EXPECT_TRUE(testBuildAttr(10, 6, ARMBuildAttrs::FP_arch,<br>
+ ARMBuildAttrs::AllowFPv4B));<br>
+ EXPECT_TRUE(testBuildAttr(10, 7, ARMBuildAttrs::FP_arch,<br>
+ ARMBuildAttrs::AllowFPARMv8A))<wbr>;<br>
+ EXPECT_TRUE(testBuildAttr(10, 8, ARMBuildAttrs::FP_arch,<br>
+ ARMBuildAttrs::AllowFPARMv8B))<wbr>;<br>
+}<br>
+<br>
+TEST(WMMXBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(11, "Tag_WMMX_arch"));<br>
+ EXPECT_TRUE(testBuildAttr(11, 0, ARMBuildAttrs::WMMX_arch,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(11, 1, ARMBuildAttrs::WMMX_arch,<br>
+ ARMBuildAttrs::AllowWMMXv1));<br>
+ EXPECT_TRUE(testBuildAttr(11, 2, ARMBuildAttrs::WMMX_arch,<br>
+ ARMBuildAttrs::AllowWMMXv2));<br>
+}<br>
+<br>
+TEST(SIMDBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(12, "Tag_Advanced_SIMD_arch"));<br>
+ EXPECT_TRUE(testBuildAttr(12, 0, ARMBuildAttrs::Advanced_SIMD_<wbr>arch,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(12, 1, ARMBuildAttrs::Advanced_SIMD_<wbr>arch,<br>
+ ARMBuildAttrs::AllowNeon));<br>
+ EXPECT_TRUE(testBuildAttr(12, 2, ARMBuildAttrs::Advanced_SIMD_<wbr>arch,<br>
+ ARMBuildAttrs::AllowNeon2));<br>
+ EXPECT_TRUE(testBuildAttr(12, 3, ARMBuildAttrs::Advanced_SIMD_<wbr>arch,<br>
+ ARMBuildAttrs::AllowNeonARMv8)<wbr>);<br>
+ EXPECT_TRUE(testBuildAttr(12, 4, ARMBuildAttrs::Advanced_SIMD_<wbr>arch,<br>
+ ARMBuildAttrs::AllowNeonARMv8_<wbr>1a));<br>
+}<br>
+<br>
+TEST(FPHPBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(36, "Tag_FP_HP_extension"));<br>
+ EXPECT_TRUE(testBuildAttr(36, 0, ARMBuildAttrs::FP_HP_<wbr>extension,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(36, 1, ARMBuildAttrs::FP_HP_<wbr>extension,<br>
+ ARMBuildAttrs::AllowHPFP));<br>
+}<br>
+<br>
+TEST(CPUAlignBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(34, "Tag_CPU_unaligned_access"));<br>
+ EXPECT_TRUE(testBuildAttr(34, 0, ARMBuildAttrs::CPU_unaligned_<wbr>access,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(34, 1, ARMBuildAttrs::CPU_unaligned_<wbr>access,<br>
+ ARMBuildAttrs::Allowed));<br>
+}<br>
+<br>
+TEST(T2EEBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(66, "Tag_T2EE_use"));<br>
+ EXPECT_TRUE(testBuildAttr(66, 0, ARMBuildAttrs::T2EE_use,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(66, 1, ARMBuildAttrs::T2EE_use,<br>
+ ARMBuildAttrs::Allowed));<br>
+}<br>
+<br>
+TEST(VirtualizationBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(68, "Tag_Virtualization_use"));<br>
+ EXPECT_TRUE(testBuildAttr(68, 0, ARMBuildAttrs::Virtualization_<wbr>use,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(68, 1, ARMBuildAttrs::Virtualization_<wbr>use,<br>
+ ARMBuildAttrs::AllowTZ));<br>
+ EXPECT_TRUE(testBuildAttr(68, 2, ARMBuildAttrs::Virtualization_<wbr>use,<br>
+ ARMBuildAttrs::<wbr>AllowVirtualization));<br>
+ EXPECT_TRUE(testBuildAttr(68, 3, ARMBuildAttrs::Virtualization_<wbr>use,<br>
+ ARMBuildAttrs::<wbr>AllowTZVirtualization));<br>
+}<br>
+<br>
+TEST(MPBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(42, "Tag_MPextension_use"));<br>
+ EXPECT_TRUE(testBuildAttr(42, 0, ARMBuildAttrs::MPextension_<wbr>use,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(42, 1, ARMBuildAttrs::MPextension_<wbr>use,<br>
+ ARMBuildAttrs::AllowMP));<br>
+}<br>
+<br>
+TEST(DivBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(44, "Tag_DIV_use"));<br>
+ EXPECT_TRUE(testBuildAttr(44, 0, ARMBuildAttrs::DIV_use,<br>
+ ARMBuildAttrs::<wbr>AllowDIVIfExists));<br>
+ EXPECT_TRUE(testBuildAttr(44, 1, ARMBuildAttrs::DIV_use,<br>
+ ARMBuildAttrs::DisallowDIV));<br>
+ EXPECT_TRUE(testBuildAttr(44, 2, ARMBuildAttrs::DIV_use,<br>
+ ARMBuildAttrs::AllowDIVExt));<br>
+}<br>
+<br>
+TEST(PCS_ConfigBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(13, "Tag_PCS_config"));<br>
+ EXPECT_TRUE(testBuildAttr(13, 0, ARMBuildAttrs::PCS_config, 0));<br>
+ EXPECT_TRUE(testBuildAttr(13, 1, ARMBuildAttrs::PCS_config, 1));<br>
+ EXPECT_TRUE(testBuildAttr(13, 2, ARMBuildAttrs::PCS_config, 2));<br>
+ EXPECT_TRUE(testBuildAttr(13, 3, ARMBuildAttrs::PCS_config, 3));<br>
+ EXPECT_TRUE(testBuildAttr(13, 4, ARMBuildAttrs::PCS_config, 4));<br>
+ EXPECT_TRUE(testBuildAttr(13, 5, ARMBuildAttrs::PCS_config, 5));<br>
+ EXPECT_TRUE(testBuildAttr(13, 6, ARMBuildAttrs::PCS_config, 6));<br>
+ EXPECT_TRUE(testBuildAttr(13, 7, ARMBuildAttrs::PCS_config, 7));<br>
+}<br>
+<br>
+TEST(PCS_R9BuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(14, "Tag_ABI_PCS_R9_use"));<br>
+ EXPECT_TRUE(testBuildAttr(14, 0, ARMBuildAttrs::ABI_PCS_R9_use,<br>
+ ARMBuildAttrs::R9IsGPR));<br>
+ EXPECT_TRUE(testBuildAttr(14, 1, ARMBuildAttrs::ABI_PCS_R9_use,<br>
+ ARMBuildAttrs::R9IsSB));<br>
+ EXPECT_TRUE(testBuildAttr(14, 2, ARMBuildAttrs::ABI_PCS_R9_use,<br>
+ ARMBuildAttrs::R9IsTLSPointer)<wbr>);<br>
+ EXPECT_TRUE(testBuildAttr(14, 3, ARMBuildAttrs::ABI_PCS_R9_use,<br>
+ ARMBuildAttrs::R9Reserved));<br>
+}<br>
+<br>
+TEST(PCS_RWBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(15, "Tag_ABI_PCS_RW_data"));<br>
+ EXPECT_TRUE(testBuildAttr(15, 0, ARMBuildAttrs::ABI_PCS_RW_<wbr>data,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(15, 1, ARMBuildAttrs::ABI_PCS_RW_<wbr>data,<br>
+ ARMBuildAttrs::AddressRWPCRel)<wbr>);<br>
+ EXPECT_TRUE(testBuildAttr(15, 2, ARMBuildAttrs::ABI_PCS_RW_<wbr>data,<br>
+ ARMBuildAttrs::AddressRWSBRel)<wbr>);<br>
+ EXPECT_TRUE(testBuildAttr(15, 3, ARMBuildAttrs::ABI_PCS_RW_<wbr>data,<br>
+ ARMBuildAttrs::AddressRWNone))<wbr>;<br>
+}<br>
+<br>
+TEST(PCS_ROBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(16, "Tag_ABI_PCS_RO_data"));<br>
+ EXPECT_TRUE(testBuildAttr(16, 0, ARMBuildAttrs::ABI_PCS_RO_<wbr>data,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(16, 1, ARMBuildAttrs::ABI_PCS_RO_<wbr>data,<br>
+ ARMBuildAttrs::AddressROPCRel)<wbr>);<br>
+ EXPECT_TRUE(testBuildAttr(16, 2, ARMBuildAttrs::ABI_PCS_RO_<wbr>data,<br>
+ ARMBuildAttrs::AddressRONone))<wbr>;<br>
+}<br>
+<br>
+TEST(PCS_GOTBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(17, "Tag_ABI_PCS_GOT_use"));<br>
+ EXPECT_TRUE(testBuildAttr(17, 0, ARMBuildAttrs::ABI_PCS_GOT_<wbr>use,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(17, 1, ARMBuildAttrs::ABI_PCS_GOT_<wbr>use,<br>
+ ARMBuildAttrs::AddressDirect))<wbr>;<br>
+ EXPECT_TRUE(testBuildAttr(17, 2, ARMBuildAttrs::ABI_PCS_GOT_<wbr>use,<br>
+ ARMBuildAttrs::AddressGOT));<br>
+}<br>
+<br>
+TEST(PCS_WCharBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(18, "Tag_ABI_PCS_wchar_t"));<br>
+ EXPECT_TRUE(testBuildAttr(18, 0, ARMBuildAttrs::ABI_PCS_wchar_<wbr>t,<br>
+ ARMBuildAttrs::<wbr>WCharProhibited));<br>
+ EXPECT_TRUE(testBuildAttr(18, 2, ARMBuildAttrs::ABI_PCS_wchar_<wbr>t,<br>
+ ARMBuildAttrs::<wbr>WCharWidth2Bytes));<br>
+ EXPECT_TRUE(testBuildAttr(18, 4, ARMBuildAttrs::ABI_PCS_wchar_<wbr>t,<br>
+ ARMBuildAttrs::<wbr>WCharWidth4Bytes));<br>
+}<br>
+<br>
+TEST(EnumSizeBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(26, "Tag_ABI_enum_size"));<br>
+ EXPECT_TRUE(testBuildAttr(26, 0, ARMBuildAttrs::ABI_enum_size,<br>
+ ARMBuildAttrs::EnumProhibited)<wbr>);<br>
+ EXPECT_TRUE(testBuildAttr(26, 1, ARMBuildAttrs::ABI_enum_size,<br>
+ ARMBuildAttrs::EnumSmallest));<br>
+ EXPECT_TRUE(testBuildAttr(26, 2, ARMBuildAttrs::ABI_enum_size,<br>
+ ARMBuildAttrs::Enum32Bit));<br>
+ EXPECT_TRUE(testBuildAttr(26, 3, ARMBuildAttrs::ABI_enum_size,<br>
+ ARMBuildAttrs::Enum32BitABI));<br>
+}<br>
+<br>
+TEST(AlignNeededBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(24, "Tag_ABI_align_needed"));<br>
+ EXPECT_TRUE(testBuildAttr(24, 0, ARMBuildAttrs::ABI_align_<wbr>needed,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(24, 1, ARMBuildAttrs::ABI_align_<wbr>needed,<br>
+ ARMBuildAttrs::Align8Byte));<br>
+ EXPECT_TRUE(testBuildAttr(24, 2, ARMBuildAttrs::ABI_align_<wbr>needed,<br>
+ ARMBuildAttrs::Align4Byte));<br>
+ EXPECT_TRUE(testBuildAttr(24, 3, ARMBuildAttrs::ABI_align_<wbr>needed,<br>
+ ARMBuildAttrs::AlignReserved))<wbr>;<br>
+}<br>
+<br>
+TEST(AlignPreservedBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(25, "Tag_ABI_align_preserved"));<br>
+ EXPECT_TRUE(testBuildAttr(25, 0, ARMBuildAttrs::ABI_align_<wbr>preserved,<br>
+ ARMBuildAttrs::<wbr>AlignNotPreserved));<br>
+ EXPECT_TRUE(testBuildAttr(25, 1, ARMBuildAttrs::ABI_align_<wbr>preserved,<br>
+ ARMBuildAttrs::<wbr>AlignPreserve8Byte));<br>
+ EXPECT_TRUE(testBuildAttr(25, 2, ARMBuildAttrs::ABI_align_<wbr>preserved,<br>
+ ARMBuildAttrs::<wbr>AlignPreserveAll));<br>
+ EXPECT_TRUE(testBuildAttr(25, 3, ARMBuildAttrs::ABI_align_<wbr>preserved,<br>
+ ARMBuildAttrs::AlignReserved))<wbr>;<br>
+}<br>
+<br>
+TEST(FPRoundingBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(19, "Tag_ABI_FP_rounding"));<br>
+ EXPECT_TRUE(testBuildAttr(19, 0, ARMBuildAttrs::ABI_FP_<wbr>rounding, 0));<br>
+ EXPECT_TRUE(testBuildAttr(19, 1, ARMBuildAttrs::ABI_FP_<wbr>rounding, 1));<br>
+}<br>
+<br>
+TEST(FPDenormalBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(20, "Tag_ABI_FP_denormal"));<br>
+ EXPECT_TRUE(testBuildAttr(20, 0, ARMBuildAttrs::ABI_FP_<wbr>denormal,<br>
+ ARMBuildAttrs::PositiveZero));<br>
+ EXPECT_TRUE(testBuildAttr(20, 1, ARMBuildAttrs::ABI_FP_<wbr>denormal,<br>
+ ARMBuildAttrs::IEEEDenormals))<wbr>;<br>
+ EXPECT_TRUE(testBuildAttr(20, 2, ARMBuildAttrs::ABI_FP_<wbr>denormal,<br>
+ ARMBuildAttrs::PreserveFPSign)<wbr>);<br>
+}<br>
+<br>
+TEST(FPExceptionsBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(21, "Tag_ABI_FP_exceptions"));<br>
+ EXPECT_TRUE(testBuildAttr(21, 0, ARMBuildAttrs::ABI_FP_<wbr>exceptions, 0));<br>
+ EXPECT_TRUE(testBuildAttr(21, 1, ARMBuildAttrs::ABI_FP_<wbr>exceptions, 1));<br>
+}<br>
+<br>
+TEST(<wbr>FPUserExceptionsBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(22, "Tag_ABI_FP_user_exceptions"))<wbr>;<br>
+ EXPECT_TRUE(testBuildAttr(22, 0, ARMBuildAttrs::ABI_FP_user_<wbr>exceptions, 0));<br>
+ EXPECT_TRUE(testBuildAttr(22, 1, ARMBuildAttrs::ABI_FP_user_<wbr>exceptions, 1));<br>
+}<br>
+<br>
+TEST(FPNumberModelBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(23, "Tag_ABI_FP_number_model"));<br>
+ EXPECT_TRUE(testBuildAttr(23, 0, ARMBuildAttrs::ABI_FP_number_<wbr>model,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(23, 1, ARMBuildAttrs::ABI_FP_number_<wbr>model,<br>
+ ARMBuildAttrs::<wbr>AllowIEEENormal));<br>
+ EXPECT_TRUE(testBuildAttr(23, 2, ARMBuildAttrs::ABI_FP_number_<wbr>model,<br>
+ ARMBuildAttrs::AllowRTABI));<br>
+ EXPECT_TRUE(testBuildAttr(23, 3, ARMBuildAttrs::ABI_FP_number_<wbr>model,<br>
+ ARMBuildAttrs::AllowIEEE754));<br>
+}<br>
+<br>
+TEST(FP16BuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(38, "Tag_ABI_FP_16bit_format"));<br>
+ EXPECT_TRUE(testBuildAttr(38, 0, ARMBuildAttrs::ABI_FP_16bit_<wbr>format,<br>
+ ARMBuildAttrs::Not_Allowed));<br>
+ EXPECT_TRUE(testBuildAttr(38, 1, ARMBuildAttrs::ABI_FP_16bit_<wbr>format,<br>
+ ARMBuildAttrs::FP16FormatIEEE)<wbr>);<br>
+ EXPECT_TRUE(testBuildAttr(38, 2, ARMBuildAttrs::ABI_FP_16bit_<wbr>format,<br>
+ ARMBuildAttrs::FP16VFP3));<br>
+}<br>
+<br>
+TEST(HardFPBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(27, "Tag_ABI_HardFP_use"));<br>
+ EXPECT_TRUE(testBuildAttr(27, 0, ARMBuildAttrs::ABI_HardFP_use,<br>
+ ARMBuildAttrs::HardFPImplied))<wbr>;<br>
+ EXPECT_TRUE(testBuildAttr(27, 1, ARMBuildAttrs::ABI_HardFP_use,<br>
+ ARMBuildAttrs::<wbr>HardFPSinglePrecision));<br>
+ EXPECT_TRUE(testBuildAttr(27, 2, ARMBuildAttrs::ABI_HardFP_use, 2));<br>
+}<br>
+<br>
+TEST(VFPArgsBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(28, "Tag_ABI_VFP_args"));<br>
+ EXPECT_TRUE(testBuildAttr(28, 0, ARMBuildAttrs::ABI_VFP_args,<br>
+ ARMBuildAttrs::BaseAAPCS));<br>
+ EXPECT_TRUE(testBuildAttr(28, 1, ARMBuildAttrs::ABI_VFP_args,<br>
+ ARMBuildAttrs::HardFPAAPCS));<br>
+ EXPECT_TRUE(testBuildAttr(28, 2, ARMBuildAttrs::ABI_VFP_args, 2));<br>
+ EXPECT_TRUE(testBuildAttr(28, 3, ARMBuildAttrs::ABI_VFP_args, 3));<br>
+}<br>
+<br>
+TEST(WMMXArgsBuildAttr, testBuildAttr) {<br>
+ EXPECT_TRUE(testTagString(29, "Tag_ABI_WMMX_args"));<br>
+ EXPECT_TRUE(testBuildAttr(29, 0, ARMBuildAttrs::ABI_WMMX_args, 0));<br>
+ EXPECT_TRUE(testBuildAttr(29, 1, ARMBuildAttrs::ABI_WMMX_args, 1));<br>
+ EXPECT_TRUE(testBuildAttr(29, 2, ARMBuildAttrs::ABI_WMMX_args, 2));<br>
+}<br>
<br>
Modified: llvm/trunk/unittests/Support/<wbr>CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/CMakeLists.txt?rev=292366&r1=292365&r2=292366&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/unittests/<wbr>Support/CMakeLists.txt?rev=<wbr>292366&r1=292365&r2=292366&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/unittests/Support/<wbr>CMakeLists.txt (original)<br>
+++ llvm/trunk/unittests/Support/<wbr>CMakeLists.txt Wed Jan 18 07:52:12 2017<br>
@@ -5,6 +5,7 @@ set(LLVM_LINK_COMPONENTS<br>
add_llvm_unittest(SupportTests<br>
AlignOfTest.cpp<br>
AllocatorTest.cpp<br>
+ ARMAttributeParser.cpp<br>
ArrayRecyclerTest.cpp<br>
BlockFrequencyTest.cpp<br>
BranchProbabilityTest.cpp<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote>
</div>
<br>
</div>
</div>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose,
or store or copy the information in any medium. Thank you.
</body>
</html>