[PATCH] tools: add support for decoding ARM attributes

Renato Golin renato.golin at linaro.org
Mon Jan 20 13:47:34 PST 2014


  What about moving the descriptions to ARMBuildAttributes.h? I'm not sure it's a good idea myself, but I'd like to hear what other people think just to get that idea out of my head, if it's stupid. ;)


================
Comment at: tools/llvm-readobj/ARMAttributeParser.cpp:321
@@ +320,3 @@
+                           uint32_t &Offset) {
+  static const char *Strings[] = { "Unused", "Small", "int", "forced to int" };
+  uint64_t Value = ParseInteger(Data, Offset);
----------------
Saleem Abdulrasool wrote:
> Richard Barton wrote:
> > Amara Emerson wrote:
> > > Renato Golin wrote:
> > > > This is more like: { "Forbidden", "Pack", "Int32", "Visible Int32" }
> > > Yep, although Rich should clarify.
> > I think it would be best for the ABI descriptions to be used here.
> I think that the ABI has some rather verbose descriptions; a short description along with raw values would go a long way to clarify values I think.
> 
> Renato, your descriptions are more precise, so Im happy to use those instead.
Saleem, I agree with you that the ABI descriptions are huge and will definitely show problems in folding lines on almost every terminal or text editor.

I think you could use the short descriptions we're discussing (mine were more suggestions, I don't mind much what, since you're dumping the numeric values as well and the ABI is public), but maybe have an option for dumping the full description (-vvv), though that would be a bit too bloated even in the code...

Richard,

I have three arguments to use short versions, maybe that'd make sense:

1. The wrapping problem I said above
2. The source file would end up huge and hard to read, and either bloat this file or the ARM ABI header
3. ABI documents evolve and change wording, we shouldn't have to update the code when that happens

Personally, I think the short descriptions are quite good overall.


http://llvm-reviews.chandlerc.com/D2576



More information about the llvm-commits mailing list