<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 30, 2015 at 5:27 PM, Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@britannica.bec.de" target="_blank">joerg@britannica.bec.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Tue, Sep 29, 2015 at 04:47:10PM +0000, James Y Knight wrote:<br>
> jyknight added inline comments.<br>
><br>
> ================<br>
> Comment at: lib/Target/Sparc/AsmParser/SparcAsmParser.cpp:470<br>
> @@ -467,1 +469,3 @@<br>
> +  // In PIC mode, the expression refers to a symbol in the GOT.<br>
> +  // The conditions correspond to the checks in matchSparcAsmModifiers.<br>
>    if (!IsEffectivelyImm13) {<br>
> ----------------<br>
> "set _GLOBAL_OFFSET_TABLE_" should be emitted with a PC22/PC10 reloc<br>
> to match, too. Can you extract the kind conversion logic to a separate function and just call it?<br>
<br>
</span>Not easily. The logic in matchSparcAsmModifiers also has to deal with<br>
GOT references, which doesn't apply to the "set" case. Splitting the<br>
logic on the other hand seems to make it more complicated, not less.<br></blockquote><div><br></div><div>Hm? I think it does apply to the set case too, in exactly the same way?</div></div></div></div>