[PATCH] D82816: [LLD][PowerPC] Implement R_PPC64_REL24_NOTOC calls, callee also has no TOC

Victor Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 12:38:37 PDT 2020


NeHuang marked an inline comment as done.
NeHuang added inline comments.


================
Comment at: lld/test/ELF/ppc64-pcrel-call-to-pcrel.s:45
+  bl callee1_stother0_local at notoc
+  add 3, 3, 30
+  b callee1_stother0_local at notoc
----------------
MaskRay wrote:
> These `add 3, 3, 30` & `mullw 3, 3, 30` instructions are not needed.
> 
> Probably worth adding a comment before the first `bl ` explaining that the next instruction does not need to be `nop` as in the R_PPC64_REL24 case.
Just want to confirm your suggestion is to remove the instruction after `bl .. at notoc` and add a comment for the `R_PPC64_REL24_NOT` cases `nop` is not needed.  In this sense, we will only keep `blr`, `bl` and `b` instructions in the test case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82816





More information about the llvm-commits mailing list