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

Victor Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 13:51:44 PDT 2020


NeHuang 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;
----------------
MaskRay wrote:
> sfertile wrote:
> > 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?
> Ah, yes, we should do it.
Why do we have `isInt<24>` instead of `isInt<26>` here?


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