<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [mips] don't save to a callee saved register too early"
   href="https://bugs.webkit.org/show_bug.cgi?id=153463#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [mips] don't save to a callee saved register too early"
   href="https://bugs.webkit.org/show_bug.cgi?id=153463">bug 153463</a>
              from <span class="vcard"><a class="email" href="mailto:guijemont&#64;igalia.com" title="Guillaume Emont &lt;guijemont&#64;igalia.com&gt;"> <span class="fn">Guillaume Emont</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=153463#c3">comment #3</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=269812&amp;action=diff" name="attach_269812" title="Patch">attachment 269812</a> <a href="attachment.cgi?id=269812&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; I just took a look at the generated code in LLIntAssembly.h and this looks
&gt; wrong to me.
&gt; I mean, if this patch fixes crashes, there is a better way to do the fix as
&gt; this patch is actually removing the $gp save/restore mechanism.</span >

I might be missing a need for the $gp save/restore mechanism, but my understanding so far is that it is only needed when making a function call (jal/jalr), and I think that there are no other cases where $gp would get overwritten (LLInt itself does not seem to touch $gp apart from that mechanism and pichdr through cpload). Under that assumption, I don't think we need to save $gp at the beginning of each function, but rather only when we are calling another PIC function (would it be from LLInt or somewhere else), which is what this patch does. And indeed it makes sense to save it in a callee saved register, since if a function will modify it it would take care of saving it.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>