[PATCH] D87504: [PowerPC][LLD] Support for PC Relative TLS for Local Dynamic

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 10:14:58 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/Arch/PPC64.cpp:783
+    const uintptr_t locAsInt = reinterpret_cast<uintptr_t>(loc);
+    if ((locAsInt % 4) == 0) {
+      write32(loc, 0x60000000);     // nop
----------------
locAsInt % 4 == 0


================
Comment at: lld/ELF/Arch/PPC64.cpp:784
+    if ((locAsInt % 4) == 0) {
+      write32(loc, 0x60000000);     // nop
+      write32(loc + 4, 0x38631000); // addi r3, r3, 4096
----------------
NOP


================
Comment at: lld/test/ELF/ppc64-tls-pcrel-ld.s:52
+	bl __tls_get_addr at notoc(x at tlsld)
+        paddi 3, 3, x at dtprel, 0
+	blr
----------------
misaligned.

Use 2 space indentation everywhere?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87504



More information about the llvm-commits mailing list