[PATCH] [ARM] ARM attribute parser incorrectly handles CPU_arch_profile

Charlie Turner charlie.turner at arm.com
Thu Nov 20 08:57:55 PST 2014


The method `ARMAttributeParser::CPU_arch_profile` in `llvm/tools/llvm-readobj/ARMAttributeParser.cpp` incorrectly switches on the value '0' for an encoded argument to `CPU_arch_profile`. This looks like a typo. From the ABI spec, the valid values for this tag are,

```
Tag_CPU_arch_profile (=7), uleb128
0 Architecture profile is not applicable (e.g. pre v7, or cross-profile code)
'A' (0x41) The application profile (e.g. for Cortex A8)
'R' (0x52) The real-time profile (e.g. for Cortex R4)
'M' (0x4D) The microcontroller profile (e.g. for Cortex M3)
’S’ (0x53) Application or real-time profile (i.e. the ‘classic’ programmer’s model)
```

Note that 0 is not a character literal.

http://reviews.llvm.org/D6341

Files:
  tools/llvm-readobj/ARMAttributeParser.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6341.16436.patch
Type: text/x-patch
Size: 485 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141120/7961c4bf/attachment.bin>


More information about the llvm-commits mailing list