[all-commits] [llvm/llvm-project] 89e3a6: [LoongArch] Emit R_LARCH_RELAX when expanding some...
ZhaoQi via All-commits
all-commits at lists.llvm.org
Fri Jan 17 01:29:44 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 89e3a649f207021c0884ed5f8e56321c51854ac3
https://github.com/llvm/llvm-project/commit/89e3a649f207021c0884ed5f8e56321c51854ac3
Author: ZhaoQi <zhaoqi01 at loongson.cn>
Date: 2025-01-17 (Fri, 17 Jan 2025)
Changed paths:
M llvm/lib/Target/LoongArch/AsmParser/LoongArchAsmParser.cpp
M llvm/test/MC/LoongArch/Macros/aliases-la.s
M llvm/test/MC/LoongArch/Macros/macros-call.s
M llvm/test/MC/LoongArch/Macros/macros-la.s
Log Message:
-----------
[LoongArch] Emit R_LARCH_RELAX when expanding some macros (#120067)
Emit `R_LARCH_RELAX` relocations when expanding some macros, including:
- `la.tls.ie`, `la.tls.ld`, `la.tls.gd`, `la.tls.desc`,
- `call36`, `tail36`.
Other macros that need to emit `R_LARCH_RELAX` relocations was
implemented in https://github.com/llvm/llvm-project/pull/72961, including:
- `la.local`, `la.pcrel`, `la.pcrel` expanded as `la.abs`, `la`,
`la.global`, `la/la.global` expanded as `la.pcrel`, `la.got`.
Note: `la.tls.le` macro can be relaxed when expanded with
`R_LARCH_TLS_LE_{HI20/ADD/LO12}_R` relocations. But if we do so,
previously handwritten assembly code will occur error due to the
redundant `add.{w/d}` followed by `la.tls.le`. So `la.tls.le` keeps to
expands with `R_LARCH_TLS_LE_{HI20/LO12}`.
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