[all-commits] [llvm/llvm-project] bd84d6: [lld][LoongArch] Convert TLS IE to LE in the norma...
Zhaoxin Yang via All-commits
all-commits at lists.llvm.org
Mon Apr 7 04:59:09 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bd84d66700b23132eecea71fb81d6d7378473937
https://github.com/llvm/llvm-project/commit/bd84d66700b23132eecea71fb81d6d7378473937
Author: Zhaoxin Yang <yangzhaoxin at loongson.cn>
Date: 2025-04-07 (Mon, 07 Apr 2025)
Changed paths:
M lld/ELF/Arch/LoongArch.cpp
M lld/ELF/Relocations.cpp
A lld/test/ELF/loongarch-relax-tls-ie.s
M lld/test/ELF/loongarch-tls-ie.s
Log Message:
-----------
[lld][LoongArch] Convert TLS IE to LE in the normal or medium code model (#123680)
Original code sequence:
* pcalau12i $a0, %ie_pc_hi20(sym)
* ld.d $a0, $a0, %ie_pc_lo12(sym)
The code sequence converted is as follows:
* lu12i.w $a0, %le_hi20(sym) # le_hi20 != 0, otherwise NOP
* ori $a0, src, %le_lo12(sym) # le_hi20 != 0, src = $a0,
# otherwise, src = $zero
TODO: When relaxation is enabled, redundant NOP can be removed. This
will be implemented in a future patch.
Note: In the normal or medium code model, original code sequence with
relocations allow interleaving, because converted code sequence
calculates the absolute offset. However, in extreme code model, to
identify the current code model, the first four instructions with
relocations must appear consecutively.
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