[all-commits] [llvm/llvm-project] 6c54ab: [lld][LoongArch] Relax R_LARCH_{PCALA, GOT_PC}_{HI2...
Zhaoxin Yang via All-commits
all-commits at lists.llvm.org
Fri Feb 14 17:19:39 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6c54ab548fa6d1b6d84864a93dbc436dc47c64b0
https://github.com/llvm/llvm-project/commit/6c54ab548fa6d1b6d84864a93dbc436dc47c64b0
Author: Zhaoxin Yang <yangzhaoxin at loongson.cn>
Date: 2025-02-15 (Sat, 15 Feb 2025)
Changed paths:
M lld/ELF/Arch/LoongArch.cpp
M lld/test/ELF/loongarch-relax-align.s
M lld/test/ELF/loongarch-relax-emit-relocs.s
A lld/test/ELF/loongarch-relax-pc-hi20-lo12-got-symbols.s
A lld/test/ELF/loongarch-relax-pc-hi20-lo12.s
Log Message:
-----------
[lld][LoongArch] Relax R_LARCH_{PCALA,GOT_PC}_{HI20,LO12} (#123566)
Support relaxation optimization for two types of code sequences.
```
From:
pcalau12i $a0, %pc_hi20(sym)
R_LARCH_PCALA_HI20, R_LARCH_RELAX
addi.w/d $a0, $a0, %pc_lo12(sym)
R_LARCH_PCALA_LO12, R_LARCH_RELAX
To:
pcaddi $a0, %pc_lo12(sym)
R_LARCH_PCREL20_S2
From:
pcalau12i $a0, %got_pc_hi20(sym_got)
R_LARCH_GOT_PC_HI20, R_LARCH_RELAX
ld.w/d $a0, $a0, %got_pc_lo12(sym_got)
R_LARCH_GOT_PC_LO12, R_LARCH_RELAX
To:
pcaddi $a0, %got_pc_hi20(sym_got)
R_LARCH_PCREL20_S2
```
Others:
- `loongarch-relax-pc-hi20-lo12-got-symbols.s` is inspired by
`aarch64-adrp-ldr-got-symbols.s`.
Co-authored-by: Xin Wang
[wangxin03 at loongson.cn](mailto:wangxin03 at loongson.cn)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list