[all-commits] [llvm/llvm-project] ba9caf: [Arm] Fix parsing and emission of Tag_also_compati...
Lucas Duarte Prates via All-commits
all-commits at lists.llvm.org
Mon Aug 1 05:28:15 PDT 2022
Author: Lucas Prates <lucas.prates at arm.com>
Date: 2022-08-01 (Mon, 01 Aug 2022)
[Arm] Fix parsing and emission of Tag_also_compatible_with eabi attribute
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.
(See [[ https://github.com/ARM-software/abi-aa/blob/60a8eb8c55e999d74dac5e368fc9d7e36e38dda4/addenda32/addenda32.rst#3373secondary-compatibility-tag | section 22.214.171.124 on the Addenda to, and Errata in, the ABI for the Arm Architecture ]].)
Currently the Arm assembly parser and streamer ignore the encoding 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 encoding.
An update to llvm-readobj to properly handle the attribute's value will be
covered by a separate patch.
Patch by Victor Campos and Lucas Prates.
Reviewed By: vhscampos
Differential Revision: https://reviews.llvm.org/D129500
More information about the All-commits