[PATCH] D129500: [Arm] Fix parsing and emission of Tag_also_compatible_with eabi attribute

Lucas Prates via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 09:50:15 PDT 2022


pratlucas created this revision.
Herald added subscribers: jdoerfert, hiraditya, kristof.beyls.
Herald added a project: All.
pratlucas requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

According to the ABI for the Arm Architecture, the value for the
Tag_also_compatible_with eabi attribute is represented by an NTBS entry.
This string value, in turn, is composed of a pair of tag+value encoded
in one of two formats:

- ULEB128: tag, ULEB128: value, 0.
- ULEB128: tag, NBTS: data.

Currently the Arm assembly parser and streamerignore the enconding of
the attribute's NTBS value, which can result in incorrect attributes
being emitted in both assembly and object file outputs.

This patch fixes these issues by properly handing the value's enconding.

Patch by Victor Campos and Lucas Prates.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129500

Files:
  llvm/include/llvm/Support/ARMBuildAttributes.h
  llvm/lib/Support/ARMBuildAttrs.cpp
  llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
  llvm/test/CodeGen/ARM/build-attributes-encoding.s
  llvm/test/MC/ARM/directive-eabi_attribute.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129500.443675.patch
Type: text/x-patch
Size: 6303 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220711/5644453d/attachment.bin>


More information about the llvm-commits mailing list