<div dir="ltr">Nice. Thank you for doing this.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 26, 2016 at 10:31 PM, Simon Atanasyan via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: atanasyan<br>
Date: Wed Apr 27 00:31:28 2016<br>
New Revision: 267673<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=267673&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=267673&view=rev</a><br>
Log:<br>
[ELF][MIPS] Remove getMipsGpAddr(). NFC<br>
<br>
Modified:<br>
    lld/trunk/ELF/OutputSections.cpp<br>
    lld/trunk/ELF/Target.cpp<br>
    lld/trunk/ELF/Target.h<br>
<br>
Modified: lld/trunk/ELF/OutputSections.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=267673&r1=267672&r2=267673&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=267673&r1=267672&r2=267673&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/ELF/OutputSections.cpp (original)<br>
+++ lld/trunk/ELF/OutputSections.cpp Wed Apr 27 00:31:28 2016<br>
@@ -1573,7 +1573,7 @@ MipsReginfoOutputSection<ELFT>::MipsRegi<br>
 template <class ELFT><br>
 void MipsReginfoOutputSection<ELFT>::writeTo(uint8_t *Buf) {<br>
   auto *R = reinterpret_cast<Elf_Mips_RegInfo *>(Buf);<br>
-  R->ri_gp_value = getMipsGpAddr<ELFT>();<br>
+  R->ri_gp_value = Out<ELFT>::Got->getVA() + MipsGPOffset;<br>
   R->ri_gprmask = GprMask;<br>
 }<br>
<br>
<br>
Modified: lld/trunk/ELF/Target.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=267673&r1=267672&r2=267673&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=267673&r1=267672&r2=267673&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/ELF/Target.cpp (original)<br>
+++ lld/trunk/ELF/Target.cpp Wed Apr 27 00:31:28 2016<br>
@@ -1595,17 +1595,5 @@ bool MipsTargetInfo<ELFT>::isRelRelative<br>
     return false;<br>
   }<br>
 }<br>
-<br>
-// _gp is a MIPS-specific ABI-defined symbol which points to<br>
-// a location that is relative to GOT. This function returns<br>
-// the value for the symbol.<br>
-template <class ELFT> typename ELFT::uint getMipsGpAddr() {<br>
-  return Out<ELFT>::Got->getVA() + MipsGPOffset;<br>
-}<br>
-<br>
-template uint32_t getMipsGpAddr<ELF32LE>();<br>
-template uint32_t getMipsGpAddr<ELF32BE>();<br>
-template uint64_t getMipsGpAddr<ELF64LE>();<br>
-template uint64_t getMipsGpAddr<ELF64BE>();<br>
 }<br>
 }<br>
<br>
Modified: lld/trunk/ELF/Target.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.h?rev=267673&r1=267672&r2=267673&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.h?rev=267673&r1=267672&r2=267673&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/ELF/Target.h (original)<br>
+++ lld/trunk/ELF/Target.h Wed Apr 27 00:31:28 2016<br>
@@ -97,7 +97,6 @@ public:<br>
 uint64_t getPPC64TocBase();<br>
<br>
 const unsigned MipsGPOffset = 0x7ff0;<br>
-template <class ELFT> typename ELFT::uint getMipsGpAddr();<br>
<br>
 extern TargetInfo *Target;<br>
 TargetInfo *createTarget();<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>