<div dir="ltr">FIPR and FTRV can have different results as when computed with primitive operations like fadd or fmul. This would not be IEEE-conform. Per default gcc avoids such instructions and some flags like -O3 allow the use of non-conform operations. One has to read through the gcc sources to see why it doesn't use them in your cases. <div><br></div><div>For the other instructions, I have no idea. Again, the gcc source code might bring us more answers. </div><div><br></div><div>--</div><div>Fabjan </div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-26 13:50 GMT+02:00 BGB <span dir="ltr"><<a href="mailto:cr88192@gmail.com" target="_blank">cr88192@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><span class="">
    <div class="m_-7800296805380482049moz-cite-prefix">On 5/26/2017 4:01 AM, D. Jeff Dionne
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div>On May 26, 2017, at 16:31, Francisco Javier Bizcocho Antúnez
        <<a href="mailto:volkovdablo@gmail.com" target="_blank">volkovdablo@gmail.com</a>> wrote:</div>
      <div><br>
      </div>
      <blockquote type="cite">
        <div>
          <div dir="ltr">
            <div>
              <div>
                <div>
                  <div>Hello all,<br>
                  </div>
                  BGB could you describe a bit more which instructions
                  from SH4 FPU were not used by C compiler?.<br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </blockquote>
      <div><br>
      </div>
      <div>I'm not sure what BGB's compiler does with the FPU, but
        basically either GCC or libgcc.a / libm.a likely needs to have
        the option to use basically all of the SH3 and later FPU
        instructions in order to achieve the best possible floating
        point performance.   SH4 also has some vector instructions,
        which are useful for things like signal processing, which likely
        are not easy for a new compiler to use..</div>
      <br>
    </blockquote>
    <br></span>
    my comment was actually based on observations from GCC, not on my
    compiler (though, I can't say whether this also holds for math code
    in the C libraries).<br>
    <br>
    as for which instructions I had seen going unused:<br>
    * FIPR, or basically the dot-product of two vectors.<br>
    * FTRV, which does a partial matrix multiply.<br>
    * FLDI0, FLDI1: which load float constants of 0.0 and 1.0<br>
    ** I don't actually know why GCC doesn't use them (it seems to
    always load them from memory).<br>
    ** my compiler may use them.<br>
    * FMAC: basically does a multiply-accumulate with floats.<br>
    ** FRn=FRn+FR0*FRm<br>
    * FSCHG: inverts <a href="http://FPSCR.SZ" target="_blank">FPSCR.SZ</a><br>
    ** GCC seems to pretty much never set SZ in my tests<br>
    *** though these tests were limited to SH4 in little-endian mode.<br>
    <br>
    similarly, the XF and XD registers were not used by GCC in my tests
    (only FRn and DRn).<br>
    <br>
    the FIPR, FTRV, and XF/XD registers were dropped from SH2A.<br>
    * the use of these registers also seems to be undefined in the C
    ABI.<br>
    <br>
    <br>
    in my FPU+SIMD extensions for my BJX1 extensions:<br>
    * XF/XD registers have been partially redubbed as FR16..FR31 and
    odd-numbered DRn registers.<br>
    * I made them freely usable by normal arithmetic instructions<br>
    ** (though directly using FR16-FR31 requires use of 32-bit I-forms).<br>
    * they are also used in composing vectors.<span class=""><br>
    <br>
    <br>
    <blockquote type="cite">
      <blockquote type="cite">
        <div>
          <div dir="ltr">
            <div>
              <div>Also I have another question related with the J2
                cores. Do you guys think is possible to exchange the SH2
                cores present in the Sega Saturn for to FPGAs with J2
                cores on them?.</div>
            </div>
          </div>
        </div>
      </blockquote>
      <div><br>
      </div>
      <div>Yes.</div>
      <br>
    </blockquote>
    <br></span>
    so they are pin-compatible? interesting.<span class=""><br>
    <br>
    <blockquote type="cite">
      <blockquote type="cite">
        <div>
          <div dir="ltr">
            <div>
              <div> This is due of the lack of JTAG capabilities of the
                original SH2 cores, I want to test if I could use this
                configuration to develop some software that could run
                later on retail Sega Saturn machines.<br>
              </div>
            </div>
          </div>
        </div>
      </blockquote>
      <div><br>
      </div>
      <div>exchange in circuit is a bit hard, you likely want to emulate
        large parts (basically building a functional equivalent) in
        FPGA.   There was great interest in doing this by some of the
        original engineers here in Japan, but the project never seems to
        have gotten off the ground (building products for customers with
        J2 has been a priority).</div>
      <br>
    </blockquote>
    <br></span>
    makes sense.<br>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
J-core mailing list<br>
<a href="mailto:J-core@lists.j-core.org">J-core@lists.j-core.org</a><br>
<a href="http://lists.j-core.org/mailman/listinfo/j-core" rel="noreferrer" target="_blank">http://lists.j-core.org/<wbr>mailman/listinfo/j-core</a><br>
<br></blockquote></div><br></div>