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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 17:51:49 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/Thunks.cpp:925
+  } else if (isInt<34>(offset)) {
+    uint64_t paddi = PADDI_R12_NO_DISP | (((offset >> 16) & 0x3ffff) << 32) |
+                     (offset & 0xffff);
----------------
const


================
Comment at: lld/ELF/Thunks.cpp:932
+    in.ppc64LongBranchTarget->addEntry(&destination, addend);
+    int64_t TOCoffset =
+        in.ppc64LongBranchTarget->getEntryVA(&destination, addend) -
----------------
const. 


================
Comment at: lld/test/ELF/ppc64-toc-call-to-pcrel-long-jump.s:6
 # RUN:       .text_caller 0x20020000 : { *(.text_caller) } \
+# RUN:       .text_caller_far 0x520020000 : { *(.text_caller_far) } \
 # RUN:       }' > %t.script
----------------
MaskRay wrote:
> This should use PHDRS now to avoid large executables. See D88037
There are too many `\`. split-file probably looks better


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