[PATCH] D86893: [PowerPC] Add support for TLS Initial Exec
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 14:16:39 PDT 2020
MaskRay added inline comments.
================
Comment at: lld/ELF/Arch/PPC64.cpp:842
+ case R_PPC64_GOT_TPREL_PCREL34: {
+ uint64_t pld = readPrefixedInstruction(loc);
+ uint64_t pldRT = pld & 0x0000000003e00000;
----------------
In some recent code we add `const` whenever appropriate
================
Comment at: lld/ELF/Arch/PPC64.cpp:845
+ // paddi RT(from pld), r13, symbol at tprel, 0
+ uint64_t paddi = 0x06000000380d0000;
+ paddi |= pldRT;
----------------
Remove this trivial variable. Just inline its use
================
Comment at: lld/ELF/Arch/PPC64.cpp:854
+ bool isFourByteAligned = (locAsInt % 4) == 0;
+ if (isFourByteAligned) {
+ uint32_t primaryOp = getPrimaryOpCode(read32(loc));
----------------
The variable can be removed.
================
Comment at: lld/test/ELF/ppc64-tls-pcrel-ie.s:66
+
+# STATIC-LABEL: IEAddr
+# STATIC-NEXT: paddi 3, 13, -28672, 0
----------------
You can move instruction dump immediate above their related `.section`
Labels need to end with `:`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86893/new/
https://reviews.llvm.org/D86893
More information about the llvm-commits
mailing list