[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
Mon Jul 6 22:56:19 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/test/ELF/ppc64-pcrel-call-to-pcrel-callee-hidden.s:111
+  mr 30, 5
+  bl callee2_stother1_local at notoc
+  add 3, 3, 30
----------------
IIUC, you can merge caller2 and caller2_tailcall and delete all instructions except:

```
.localentry caller2_tailcall, 1
bl callee2_stother1_local at notoc
b callee2_stother1_local at notoc
```


================
Comment at: lld/test/ELF/ppc64-pcrel-call-to-pcrel.s:52
+callee1_stother0_local:
+  mullw 3, 3, 3
+  extsw 3, 3
----------------
I think these instructions are entirely irrelevant to the test and should be deleted to make tests more focused/readable.

mullw 3, 3, 3
ext3sw 3,3

Please check some newer x86-64-* and aarch64-* tests. They don't have such setup instructions.

But please keep the instruction after `bl ... at notoc` to make it clear that the next instruction is not special as in R_PPC64_REL24

I think cleaning up the instructions can make the test smaller by at least one half.


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