From: Jinsong Ji Date: Mon, 11 Mar 2019 17:57:49 +0000 (+0000) Subject: [NFC][PowerPC] Add comment for PPCAsmPrinter::printOperand X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b9ddbde0268c938620304976834709419eb5def;p=llvm [NFC][PowerPC] Add comment for PPCAsmPrinter::printOperand Patch by Yi-Hong Lyu git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355848 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index a8d4303939a..568ad3b6018 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -96,6 +96,9 @@ public: void EmitInstruction(const MachineInstr *MI) override; + /// This function is for PrintAsmOperand and PrintAsmMemoryOperand, + /// invoked by EmitMSInlineAsmStr and EmitGCCInlineAsmStr only. + /// The \p MI would be INLINEASM ONLY. void printOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O); bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, @@ -164,8 +167,9 @@ void PPCAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo, switch (MO.getType()) { case MachineOperand::MO_Register: { - unsigned Reg = PPCInstrInfo::getRegNumForOperand(MI->getDesc(), - MO.getReg(), OpNo); + // The MI is INLINEASM ONLY and UseVSXReg is always false. + unsigned Reg = + PPCInstrInfo::getRegNumForOperand(MI->getDesc(), MO.getReg(), OpNo); const char *RegName = PPCInstPrinter::getRegisterName(Reg);