[PATCH] D79625: [PowerPC] Extend .reloc directive on PowerPC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 12:10:23 PDT 2020
MaskRay added inline comments.
================
Comment at: llvm/include/llvm/MC/MCExpr.h:305
VK_PPC_NOTOC, // symbol at notoc
+ VK_PPC_PCREL_OPT, // .reloc expr, R_PPC64_PCREL_OPT, expr
----------------
I am not sure VK_PPC_PCREL_OPT is needed.
`ELFPPCAsmBackend::getFixupKind` will return `FirstLiteralRelocationKind + R_PPC64_PCREL_OPT`
================
Comment at: llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp:1665
+ else if (IDVal == ".reloc")
+ ParseDirectiveReloc(DirectiveID.getLoc());
else
----------------
We should just reuse the generic .reloc parsing code and enhance it with `.reloc . - 4, ...` instead of adding a ppc64 specific clone.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79625/new/
https://reviews.llvm.org/D79625
More information about the llvm-commits
mailing list