[PATCH] D83504: [PowerPC] Implement R_PPC64_REL24_NOTOC local calls. callee has a TOC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 9 15:04:47 PDT 2020
MaskRay added inline comments.
================
Comment at: lld/ELF/Arch/PPC64.cpp:1053
+ if (type == R_PPC64_REL24_NOTOC && (s.stOther >> 5) > 1)
+ return true;
+
----------------
misaligned
================
Comment at: lld/ELF/Target.h:216
+// The prefixed instruction is always a 4 byte prefix followed by a 4 byte
+// instruction. Therefore, the prefix is always in lower memory than the
----------------
Make it imperative, i.e.
// Write a prefixed instruction, which is a 4-byte prefix followed by a 4-byte instruction (regardless of endianness).
"As a result, we need to shift the pieces around on little endian machines." is not needed.
================
Comment at: lld/test/ELF/ppc64-pcrel-call-to-toc.s:18
+
+# The test is created to check that when a function without TOC access a
+# local function using TOC, a r12 setup stub is inserted.
----------------
`## `
================
Comment at: lld/test/ELF/ppc64-pcrel-call-to-toc.s:22
+# SYMBOL: 1: 0000000010020000 0 NOTYPE LOCAL DEFAULT [<other: 0x60>] 2 callee
+# SYMBOL: 2: 0000000010030000 0 NOTYPE LOCAL DEFAULT [<other: 0x20>] 3 caller
+# SYMBOL: 3: 0000000010010000 0 NOTYPE LOCAL DEFAULT 1 func
----------------
`-NEXT:`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83504/new/
https://reviews.llvm.org/D83504
More information about the llvm-commits
mailing list