[PATCH] D13173: [SPARC] Improve PIC vs non-PIC handling

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 10:33:23 PDT 2015


On Wed, Sep 30, 2015 at 5:27 PM, Joerg Sonnenberger <joerg at britannica.bec.de
> wrote:

> On Tue, Sep 29, 2015 at 04:47:10PM +0000, James Y Knight wrote:
> > jyknight added inline comments.
> >
> > ================
> > Comment at: lib/Target/Sparc/AsmParser/SparcAsmParser.cpp:470
> > @@ -467,1 +469,3 @@
> > +  // In PIC mode, the expression refers to a symbol in the GOT.
> > +  // The conditions correspond to the checks in matchSparcAsmModifiers.
> >    if (!IsEffectivelyImm13) {
> > ----------------
> > "set _GLOBAL_OFFSET_TABLE_" should be emitted with a PC22/PC10 reloc
> > to match, too. Can you extract the kind conversion logic to a separate
> function and just call it?
>
> Not easily. The logic in matchSparcAsmModifiers also has to deal with
> GOT references, which doesn't apply to the "set" case. Splitting the
> logic on the other hand seems to make it more complicated, not less.
>

Hm? I think it does apply to the set case too, in exactly the same way?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150930/7c1b5c95/attachment.html>


More information about the llvm-commits mailing list