[PATCH] D83504: [PowerPC] Implement R_PPC64_REL24_NOTOC local calls. callee has a TOC

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 08:41:12 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/Thunks.cpp:981
 
+  if (type == R_PPC64_REL24_NOTOC && (s.stOther >> 5) > 1)
+    return make<PPC64R12SetupStub>(s);
----------------
What if `(s.stOther >> 5) == 1`?


================
Comment at: lld/test/ELF/ppc64-pcrel-call-to-toc.s:18
+
+## The test is created to check that when a function without TOC access a
+## local function using TOC, a r12 setup stub is inserted.
----------------
 `The test is created to check that` can be omitted. `local` is not accurate.

## When a function without TOC accesses a function using TOC, an r12 setup stub is inserted.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83504





More information about the llvm-commits mailing list