[PATCH] D62464: [PPC32] Improve 32-bit PowerPC
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 20:48:36 PDT 2019
ruiu added inline comments.
================
Comment at: ELF/Arch/PPC.cpp:115
+ for (; Buf < End; Buf += 4)
+ write32(Buf, 0x60000000);
+}
----------------
Is this a nop? Can you add a comment?
================
Comment at: ELF/SyntheticSections.cpp:2313
+ // Then write PLTresolve.
+ Target->writePltHeader(Buf + 4 * N);
+ return;
----------------
Hmm, so we don't call writePlt() if a target is PPC32?
================
Comment at: ELF/Thunks.cpp:243
+class PPC32PltCallStub final : public Thunk {
+ // For R_PPC_PLTREL24, this records the addend, which will be used to decide
+ // the offsets in the call stub.
----------------
nit: usually we write public members before private members.
================
Comment at: ELF/Thunks.cpp:709
+void PPC32PltCallStub::writeTo(uint8_t *Buf) {
+ if (Config->Pic) {
+ uint32_t Offset;
----------------
nit: flip the condition and return early so that the indentation is one level shallower?
================
Comment at: ELF/Thunks.cpp:717-718
+ File->PPC32Got2OutSecOff + Addend);
+ }
+ else {
+ // The stub loads an address relative to _GLOBAL_OFFSET_TABLE_.
----------------
format.
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62464/new/
https://reviews.llvm.org/D62464
More information about the llvm-commits
mailing list