<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [jsc][mips] Add missing MacroAssembler functions after r214187"
   href="https://bugs.webkit.org/show_bug.cgi?id=170089#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [jsc][mips] Add missing MacroAssembler functions after r214187"
   href="https://bugs.webkit.org/show_bug.cgi?id=170089">bug 170089</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 Adrian Perez from <a href="show_bug.cgi?id=170089#c4">comment #4</a>)
<span class="quote">&gt; (In reply to Yusuke Suzuki from <a href="show_bug.cgi?id=170089#c3">comment #3</a>)
&gt; &gt; Comment on <span class=""><a href="attachment.cgi?id=305523&amp;action=diff" name="attach_305523" title="Patch">attachment 305523</a> <a href="attachment.cgi?id=305523&amp;action=edit" title="Patch">[details]</a></span>
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; View in context:
&gt; &gt; <a href="https://bugs.webkit.org/attachment.cgi?id=305523&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=305523&amp;action=review</a>
&gt; &gt; 
&gt; &gt; r=me with comment.
&gt; &gt; 
&gt; &gt; &gt; Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h:2462
&gt; &gt; &gt; +    void loadFloat(ImplicitAddress address, FPRegisterID dest)
&gt; &gt; &gt; +    {
&gt; &gt; &gt; +        if (address.offset &gt;= -32768 &amp;&amp; address.offset &lt;= 32767
&gt; &gt; &gt; +            &amp;&amp; !m_fixedWidth) {
&gt; &gt; &gt; +            m_assembler.lwc1(dest, address.base, address.offset);
&gt; &gt; &gt; +        } else {
&gt; &gt; &gt; +            /*
&gt; &gt; &gt; +               lui     addrTemp, (offset + 0x8000) &gt;&gt; 16
&gt; &gt; &gt; +               addu    addrTemp, addrTemp, base
&gt; &gt; &gt; +               lwc1    dest, (offset &amp; 0xffff)(addrTemp)
&gt; &gt; &gt; +               */
&gt; &gt; &gt; +            m_assembler.lui(addrTempRegister, (address.offset + 0x8000) &gt;&gt; 16);
&gt; &gt; &gt; +            m_assembler.addu(addrTempRegister, addrTempRegister, address.base);
&gt; &gt; &gt; +            m_assembler.lwc1(dest, addrTempRegister, address.offset);
&gt; &gt; &gt; +        }
&gt; &gt; &gt; +    }
&gt; &gt; 
&gt; &gt; Looking the loadDouble code, we can see WTF_MIPS_ISA(1) guard.
&gt; &gt; Isn't it required here?
&gt; 
&gt; I think Yusuke is right. FPRegisterIDs refer to 64-bit registers. In
&gt; MIPS32/MIPS-II “ldc1” can be used to load a 32-bit value directly,
&gt; but in MIPS-I it is needed to use two “lwc1” instructions, one for
&gt; each 32-bit half of the 64-bit value.</span >

No, I don't think we need that guard. loadDouble/storeDouble use that because MIPS-I does not contain the ldc1 (resp. sdc1) instruction, and therefore two lwc1 (resp swc1) instructions are used instead for the MIPS-I version. In loadFloat/storeFloat, we do not use ldc1/sdc1, and all the instructions that we use are MIPS-I compatible AFAIK, so there's no need for an alternative version.
You can see that the pre-existing loadFloat/storeFloat with a BaseIndex argument don't have such a guard either, for the same reasons.

Another way to put it: the need for special cases for MIPS-I only exists when dealing with doubles. The fact of using an ImplicitAddress instead of a BaseIndex does not incur this need. 

Another debate is whether we still want to support MIPS-I, I don't know if there still are many devices using that where it makes sense to use webkit, though I could be wrong, because, hey, we have these guards in the code.</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>