[PATCH] D66724: [AIX]Emit function descriptor csect in assembly
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 7 08:37:04 PDT 2019
sfertile added inline comments.
================
Comment at: llvm/lib/MC/MCExpr.cpp:445
void MCSymbolRefExpr::printVariantKind(raw_ostream &OS) const {
- if (UseParensForSymbolVariant)
+ if (getKind() == MCSymbolRefExpr::VK_PPC_TOC_TC0)
+ OS << '[' << MCSymbolRefExpr::getVariantKindName(getKind()) << ']';
----------------
jasonliu wrote:
> I don't quite like how we do the special case here just for VK_PPC_TOC_TC0 kind.
> Not sure if we can do something better. Or we could leave it like this for now, and if we find other MCSymbolRefExpr like this, we could common them up.
> Any thoughts, @sfertile @hubert.reinterpretcast ?
I'm not aware of any other square brackets used in symbol references on AIX, but I'm still pretty new to AIX assembly so that doesn't mean there isn't any.
We *could* add a bitfield to the MCSymbolRefExpr (similar to the `UseParensForSymbolVariant` field, but then we likely just have the same 'if' in the SymbolRef constructor to set the new bitfield.
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