diff options
author | Jinyang He <hejinyang@loongson.cn> | 2024-03-05 15:50:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-05 15:50:14 +0800 |
commit | eaa9ef678c63bf392ec2d5b736605db7ea7e7338 (patch) | |
tree | 5c25cf3beb46b9b427409d5c7b09a8403113d918 /llvm/lib/CodeGen/MachinePipeliner.cpp | |
parent | 46f65e45e0f5ce4cc0edabceebee681231d24687 (diff) | |
download | llvm-eaa9ef678c63bf392ec2d5b736605db7ea7e7338.zip llvm-eaa9ef678c63bf392ec2d5b736605db7ea7e7338.tar.gz llvm-eaa9ef678c63bf392ec2d5b736605db7ea7e7338.tar.bz2 |
[lld][LoongArch] Support the R_LARCH_{ADD,SUB}_ULEB128 relocation types (#81133)
For a label difference like `.uleb128 A-B`, MC generates a pair of
R_LARCH_{ADD,SUB}_ULEB128 if A-B cannot be folded as a constant. GNU
assembler generates a pair of relocations in more cases (when A or B is
in a code section with linker relaxation). It is similar to RISCV.
R_LARCH_{ADD,SUB}_ULEB128 relocations are created by Clang and GCC in
`.gcc_except_table` and other debug sections with linker relaxation
enabled. On LoongArch, first read the buf and count the available space.
Then add or sub the value. Finally truncate the expected value and fill
it into the available space.
Diffstat (limited to 'llvm/lib/CodeGen/MachinePipeliner.cpp')
0 files changed, 0 insertions, 0 deletions