[PATCH] D66724: [AIX]Emit function descriptor csect in assembly
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 15:40:23 PDT 2019
hubert.reinterpretcast added inline comments.
================
Comment at: llvm/lib/MC/MCAsmInfoXCOFF.cpp:30
+bool MCAsmInfoXCOFF::isValidUnquotedName(StringRef Name) const {
+ // FIXME: remove this function when we don't use "TOC[TC0]" as symbol name
+ // any more.
----------------
Minor nit: Add "a" before "symbol name". Capitalize "remove".
Change "don't use [ ... ] anymore" to "stop using [ ... ]".
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1680
+ cast<MCSymbolXCOFF>(CurrentFnSym)->setContainingCsect(FnEntryPointSec);
+
+ ORE = &getAnalysis<MachineOptimizationRemarkEmitterPass>().getORE();
----------------
I think the base class `SetupMachineFunction` might be usable if it called two functions in order to setup a function descriptor symbol as necessary, and then retrieve the entry point symbol. Although the copy/paste is currently one line, it might grow in the future.
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1768
+ MCSectionXCOFF *TOCBaseSection = OutStreamer->getContext().getXCOFFSection(
+ TOC, XCOFF::XMC_TC0, XCOFF::XTY_SD, XCOFF::C_HIDEXT,
+ SectionKind::getData());
----------------
Please name the section "TOC" and not "TOC[TC0]". The section name is not used by the assembly generation, but we might find a use for it for the object generation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66724/new/
https://reviews.llvm.org/D66724
More information about the llvm-commits
mailing list