[llvm] r372986 - Updated comments in LWZtoc pseudo expansion.

Sean Fertile via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 08:12:30 PDT 2019


Author: sfertile
Date: Thu Sep 26 08:12:30 2019
New Revision: 372986

URL: http://llvm.org/viewvc/llvm-project?rev=372986&view=rev
Log:
Updated comments in LWZtoc pseudo expansion.

Refined a couple of the comments in the LWZtoc expansion code based on
a post commit review comment.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp

Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=372986&r1=372985&r2=372986&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Thu Sep 26 08:12:30 2019
@@ -685,15 +685,16 @@ void PPCAsmPrinter::EmitInstruction(cons
       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 &&




More information about the llvm-commits mailing list