[PATCH] D86706: [LLD][PowerPC] Add pc-rel based long branch thunks

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 07:05:01 PDT 2020


sfertile accepted this revision.
sfertile added a comment.
This revision is now accepted and ready to land.

One minor nit, but otherwise LGTM.  If Nemanja would still like the comment he suggested make sure to address that before committing.



================
Comment at: lld/ELF/Thunks.cpp:968
+  if (!isInt<34>(offset))
+    fatal("offset overflow 34 bits, use large code model with mcmodel=large");
+  uint64_t paddi = PADDI_R12_NO_DISP | (((offset >> 16) & 0x3ffff) << 32) |
----------------
Real minor nit: `mcmodel=large` is a helpful hint, but I think its only relevant if you are using a C/C++ compiler and maybe fortran. It might be confusing if you are linking objects that came from a different source language.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86706/new/

https://reviews.llvm.org/D86706



More information about the llvm-commits mailing list