[all-commits] [llvm/llvm-project] 7198c8: [ELF][PPC64] Actually implement --no-power10-stubs
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Feb 27 16:19:25 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7198c87f42f6c15d76b127c1c63530e9b4d5dd39
https://github.com/llvm/llvm-project/commit/7198c87f42f6c15d76b127c1c63530e9b4d5dd39
Author: Fangrui Song <i at maskray.me>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M lld/ELF/Thunks.cpp
M lld/ELF/Thunks.h
M lld/test/ELF/ppc64-pcrel-call-to-extern.s
M lld/test/ELF/ppc64-pcrel-call-to-toc.s
Log Message:
-----------
[ELF][PPC64] Actually implement --no-power10-stubs
When a caller that does not use TOC calls a function, a call stub is needed if
the function may use TOC. --no-power10-stubs avoids PC-relative instructions in
the code sequence.
The --no-power10-stubs=no implementation added in D94627 is wrong.
First, the first instruction incorrectly uses `mflr 0` (instead of `mflr 12`).
Second, for the PLT case, it uses addis+addi with getVA instead of addis+ld with
getGotPltVA.
More information about the All-commits
mailing list