[PATCH] D82950: [PowerPC] Support PCRelative Callees for R_PPC64_REL24 Relocation

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 7 19:01:30 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/Thunks.cpp:982
 
+  if ((s.stOther >> 5) == 1 && type == R_PPC64_REL24)
+    return make<PPC64R2SaveStub>(s);
----------------
This needs a comment.


================
Comment at: lld/test/ELF/ppc64-error-toc-local-call.s:7
+
+# This test checks that the linker produces errors when it is missing the nop
+# after a local call to a callee with st_other=1.
----------------
Use `## ` for comments. Newer tests conform to this rule.


================
Comment at: lld/test/ELF/ppc64-toc-call-to-pcrel-long-jump.s:29
+  lwz 4, global at toc@l(30)
+  add 3, 4, 3
+  bl callee
----------------
`add 3, 4, 3` is irrelevant and can be deleted.


================
Comment at: lld/test/ELF/ppc64-toc-call-to-pcrel-long-jump.s:35
+  .long	0
+  .size global, 4
----------------
`.size` can be deleted


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82950





More information about the llvm-commits mailing list