[PATCH] D87916: [PowerPC][LLD] Extend R2 save stub to support offsets of more than 26 bits
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 08:46:41 PDT 2020
sfertile added inline comments.
================
Comment at: lld/ELF/Thunks.cpp:295
+ }
+ uint32_t size() override { return isInt<24>(computeOffset()) ? 8 : 20; }
void writeTo(uint8_t *buf) override;
----------------
Arm thunks avoid oscillating between [[ https://github.com/llvm/llvm-project/blob/0c4f91f84b2efe8975848a7a13c08d7479abe752/lld/ELF/Thunks.cpp#L96 | short and long thunk bodies]]. The comment says it can prevent the layout from converging. Should we do the same?
================
Comment at: lld/ELF/Thunks.cpp:916
+ in.ppc64LongBranchTarget->addEntry(&destination, addend);
+ int64_t TOCoffset =
+ in.ppc64LongBranchTarget->getEntryVA(&destination, addend) -
----------------
I know its a bit of a pain, but I think we should rename the local to aviod having a variable name start with an uppercase letter. Maybe 'offsetFromTOC'?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87916/new/
https://reviews.llvm.org/D87916
More information about the llvm-commits
mailing list