[PATCH] D28291: [ARM] Create SubtargetFeatures from build attributes

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 07:45:33 PST 2017


samparker added inline comments.


================
Comment at: test/tools/llvm-objdump/ARM/v7a-subfeature.s:1
+@ RUN: llvm-mc < %s -triple armv7a -mattr=+vfp3,+neon,+fp16,+hwdiv-arm -filetype=obj | llvm-objdump -triple=arm -d - | FileCheck %s
+
----------------
rengolin wrote:
> samparker wrote:
> > rengolin wrote:
> > > If you pass the `-mattr`, it doesn't need to read the `.eabi_attributes`, so what does this test really test?
> > As far as I can tell, the mattr is used by mc to detect valid instructions, but it is not used to encode the build attributes. So they're needed in the test so the attributes are encoded for objdump to read.
> That's my point. Here you have two ways to setup the attributes: `-marttr` and `.eabi_attribute`. What you need is to make sure that *both* ways work for your purposes.
> 
> If you create one test with `-mattr` and *another* with the same `.eabi_attribute`, making sure they're complete to describe what you need, than you covered both cases.
But this patch isn't about enabling llvm-mc to write attributes that are provided via the -mattr option. These tests surely only need to prove that they can use what is provided in the binary.


https://reviews.llvm.org/D28291





More information about the llvm-commits mailing list