[PATCH] D86608: [LLD][PowerPC] Add support for TLS Local Exec

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 04:32:21 PDT 2020


stefanp added inline comments.


================
Comment at: lld/test/ELF/ppc64-tls-pcrel-le.s:3
+# RUN: echo 'SECTIONS { \
+# RUN:   .text_addr  0x10010000 : { *(.text_addr) } \
+# RUN:   .text_value 0x10020000 : { *(.text_value) } \
----------------
NeHuang wrote:
> Do we need the address set up for this case? Seems we are not checking/verifying the offset using in the `paddi` to access `x`, `y` and `z`
That is a good point. All of the `paddi` instructions are not PC Relative in this case, they are all TP relative. Therefore the position of the `paddi` doesn't matter. I'll remove the sections.


================
Comment at: lld/test/ELF/ppc64-tls-pcrel-le.s:54
+
+LocalExecAddrY:
+	paddi 3, 13, y at TPREL, 0
----------------
NeHuang wrote:
> what is the test purpose of adding symbol y, it seems identical as the case for symbol x?
I know that `x` and `y` are pretty much the same thing. The reason why I added the `y` was because I wanted a variable that was not just at `TP - 0x7000`. I wanted to check that we got the correct offset based on the size of `x`. Technically `z` could also serve this purpose but I would prefer to keep all three variables to keep what each one is testing separate.


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

https://reviews.llvm.org/D86608



More information about the llvm-commits mailing list