]> granicus.if.org Git - llvm/commitdiff
Updated comments in LWZtoc pseudo expansion.
authorSean Fertile <sfertile@ca.ibm.com>
Thu, 26 Sep 2019 15:12:30 +0000 (15:12 +0000)
committerSean Fertile <sfertile@ca.ibm.com>
Thu, 26 Sep 2019 15:12:30 +0000 (15:12 +0000)
Refined a couple of the comments in the LWZtoc expansion code based on
a post commit review comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372986 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCAsmPrinter.cpp

index 5ab2701be0ee963d0b47259cb4327e8ff4a7c225..6e0fdd8574ea47cd739e0b0952cc026d37092950 100644 (file)
@@ -685,15 +685,16 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
       return;
     }
 
-    // Otherwise use the TOC. 'TOCEntry' is a local symbol used to reference
-    // the storage allocated in the TOC which contains the address of
+    // Otherwise use the TOC. 'TOCEntry' is a label used to reference the
+    // storage allocated in the TOC which contains the address of
     // 'MOSymbol'. Said TOC entry will be synthesized later.
     MCSymbol *TOCEntry = lookUpOrCreateTOCEntry(MOSymbol);
     const MCExpr *Exp =
         MCSymbolRefExpr::create(TOCEntry, MCSymbolRefExpr::VK_None, OutContext);
 
-    // AIX uses the local symbol directly for the operand; that the symbol is
-    // accessed toc-relative is implicit.
+    // AIX uses the label directly as the lwz displacement operand for
+    // references into the toc section. The displacement value will be generated
+    // relative to the toc-base.
     if (IsAIX) {
       assert(
           TM.getCodeModel() == CodeModel::Small &&