[PATCH] D52564: [PPC64] Add test for toc-restore on recursive call.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 26 11:29:25 PDT 2018


MaskRay added inline comments.


================
Comment at: test/ELF/ppc64-toc-restore-recursive-call.s:41
+    addi 5, 3, -1
+    mulld 4, 4, 3
+    mr 3, 5
----------------
Are these extra operations (addi, mulld, ...) needed to make the test feel more authentic?


================
Comment at: test/ELF/ppc64-toc-restore-recursive-call.s:44
+    bl recursive_func
+    nop
+    mr 4, 3
----------------
Is this related to the behavior of powerpc gcc >= 5.0?

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gold/powerpc.cc;hb=4e57b456393946cb4f90131b78e162cdec903c8a#l9069


We had a discussion in https://reviews.llvm.org/D46204 that pre-5 versions of GCC did not emit a nop after bl.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52564





More information about the llvm-commits mailing list