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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 12:19:09 PDT 2020


MaskRay added a comment.

One thought. If you want to merge two test files,

  ifdef global
  .globl foo
  .endif
  foo:



1. llvm-mc -filetype=obj
2. llvm-mc -filetype=obj --defsym global=1



================
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
----------------
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.


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