aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorJinyang He <hejinyang@loongson.cn>2024-01-24 09:17:49 +0800
committerGitHub <noreply@github.com>2024-01-24 09:17:49 +0800
commitc51ab483e6c2d991a01179584705b83fbea1940d (patch)
tree5abd1d5ffabdc9842e776243715ebab449eca637 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentc41472dbafd0dcacd943a95a9a099c1942d50394 (diff)
downloadllvm-c51ab483e6c2d991a01179584705b83fbea1940d.zip
llvm-c51ab483e6c2d991a01179584705b83fbea1940d.tar.gz
llvm-c51ab483e6c2d991a01179584705b83fbea1940d.tar.bz2
[LoongArch] Insert nops and emit align reloc when handle alignment directive (#72962)
Refer to RISCV, we will fix up the alignment if linker relaxation changes code size and breaks alignment. Insert enough Nops and emit R_LARCH_ALIGN relocation type so that linker could satisfy the alignment by removing Nops. It does so only in sections with the SHF_EXECINSTR flag. In LoongArch psABI v2.30, R_LARCH_ALIGN requires symbol index. The lowest 8 bits of addend represent alignment and the other bits of addend represent the maximum number of bytes to emit.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions