diff options
| author | Peter Smith <peter.smith@arm.com> | 2020-04-04 17:15:19 +0100 |
|---|---|---|
| committer | Peter Smith <peter.smith@arm.com> | 2020-04-08 12:43:44 +0100 |
| commit | 28b172e34177fe925ac4f54de2ce073e1d6029d9 (patch) | |
| tree | 25c8e1123f8966b4206e4517e901370831706aa2 /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
| parent | 66c18c729da456680af7884f551a6c4627dc6372 (diff) | |
| download | llvm-28b172e34177fe925ac4f54de2ce073e1d6029d9.zip llvm-28b172e34177fe925ac4f54de2ce073e1d6029d9.tar.gz llvm-28b172e34177fe925ac4f54de2ce073e1d6029d9.tar.bz2 | |
[LLD][ELF][ARM] Implement ARM pc-relative relocations for ADR and LDR
The R_ARM_ALU_PC_G0 and R_ARM_LDR_PC_G0 relocations are used by the
ADR and LDR pseudo instructions, and are the basis of the group
relocations that can load an arbitrary constant via a series of add, sub
and ldr instructions.
The relocations need to be obtained via the .reloc directive.
R_ARM_ALU_PC_G0 is much more complicated as the add/sub instruction uses
a modified immediate encoding of an 8-bit immediate rotated right by an
even 4-bit field. This means that the range of representable immediates
is sparse. We extract the encoding and decoding functions for the modified
immediate from llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h as
this header file is not accessible from LLD. Duplication of code isn't
ideal, but as these are well-defined mathematical functions they are
unlikely to change.
Differential Revision: https://reviews.llvm.org/D75349
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
0 files changed, 0 insertions, 0 deletions
