[PATCH] D87916: [PowerPC][LLD] Extend R2 save stub to support offsets of more than 26 bits

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 10:52:36 PDT 2020


stefanp added inline comments.


================
Comment at: lld/ELF/Thunks.cpp:293
+  PPC64R2SaveStub(Symbol &dest, int64_t addend) : Thunk(dest, addend) {
+    alignment = 16;
+  }
----------------
MaskRay wrote:
> Any reason the alignment is 16?
I've added a prefixed instruction (or the possibility of getting a prefixed instruction) `paddi` to the Thunk. The issue with prefixed instructions is that they are not allowed to cross a 64 byte boundary. It's a hardware limitation. If I align to 16 bytes I know that the next 16 bytes cannot cross a 64 byte boundary and so my `paddi` won't cross a 64 byte boundary.


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