[PATCH] Add support for small-model PIC for PowerPC.

Justin Hibbits jrh29 at alumni.cwru.edu
Thu Sep 18 11:01:43 PDT 2014


================
Comment at: lib/Target/PowerPC/PPCAsmPrinter.cpp:415
@@ +414,3 @@
+      const MCExpr *PB =
+        MCSymbolRefExpr::Create(OutContext.GetOrCreateSymbol(Twine(".LTOC.")),
+                                                             OutContext);
----------------
hfinkel wrote:
> Why?
This was part of the cleanup of the original check-in (because both implementations are rather intertwined in code touched, I lumped them together).  I can remove this change.

================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:1700
@@ -1697,1 +1699,3 @@
+      else
+        GOTPtr = DAG.getNode(PPCISD::GlobalBaseReg, dl, PtrVT);
     }
----------------
hfinkel wrote:
> Should we rename the GOTPtr variable?
In both cases it points to the GOT.  Although, GOTPtr is a little silly for 64-bit.

================
Comment at: lib/Target/PowerPC/PPCInstrInfo.td:3694
@@ -3692,1 +3693,2 @@
 defm : TrapExtendedMnemonic<"u", 31>;
+
----------------
hfinkel wrote:
> Don't need to add a line here.
Hmm, no idea how that snuck in there.

http://reviews.llvm.org/D5399






More information about the llvm-commits mailing list