<html>
  <head>
    <meta content="text/html; charset=iso-8859-2"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Jeste jedna podotazka, stve me, ze
      prekladac kazdy mezivysledek strka do pameti, napr. takto<br>
      <br>
      (786)          amp = (ph1*ph1 + ph2*ph2 + ph3*ph3) * 2.0; 
      //-fno-math-errno<br>
      080017E8    vldr    s14, [r7, #56]    ; 0x38<br>
      080017EC    vldr    s15, [r7, #56]    ; 0x38<br>
      080017F0    vmul.f32    s14, s14, s15<br>
      080017F4    vldr    s13, [r7, #52]    ; 0x34<br>
      080017F8    vldr    s15, [r7, #52]    ; 0x34<br>
      080017FC    vmul.f32    s15, s13, s15<br>
      08001800    vadd.f32    s14, s14, s15<br>
      08001804    vldr    s13, [r7, #48]    ; 0x30<br>
      08001808    vldr    s15, [r7, #48]    ; 0x30<br>
      0800180C    vmul.f32    s15, s13, s15<br>
      08001810    vadd.f32    s15, s14, s15<br>
      08001814    vadd.f32    s15, s15, s15<br>
      <b>08001818    vstr    s15, [r7, #44]    ; 0x2c</b><b><br>
      </b><b>(787)          asm volatile  ("vsqrt.f32 %0, %1" : "=w"
        (amp) : "w" (amp) );</b><b><br>
      </b><b>0800181C    vldr    s15, [r7, #44]    ; 0x2c</b><b><br>
      </b>08001820    vsqrt.f32    s15, s15<br>
      08001824    vstr    s15, [r7, #44]    ; 0x2c<br>
      <br>
      program vypada takto:<br>
               float amp;<br>
      ...<br>
              amp = (ph1*ph1 + ph2*ph2 + ph3*ph3) * 2.0; <br>
              asm volatile  ("vsqrt.f32 %0, %1" : "=w" (amp) : "w" (amp)
      );<br>
       <br>
      Optimalizace je na rychlost -Ofast<br>
      <br>
      Jde s tim neco delat?<br>
      <br>
      A jeste jedna podotazka, proc byva u inline assembleru volatile?
      Bez toho to prelozi stejne v tomto pripade.<br>
      <br>
      <br>
      Dne 11.02.2017 v 19:08 Jaroslav Buchta napsal(a):<br>
    </div>
    <blockquote
      cite="mid:3718b20b-7400-6d7a-8409-f71942bc6285@hascomp.cz"
      type="cite">Nevite, jak donutit gcc aby misto knihovni funkce
      sqrtf pouzil instrukci vsqrt.f32 ?
      <br>
      <br>
      Asi bych to tam dokazal nacpat assemblerem ale moc se mi to
      nelibi.Ostatni FPU instrukce pouziva normalne.
      <br>
      <br>
      _______________________________________________
      <br>
      HW-list mailing list  -  sponsored by <a class="moz-txt-link-abbreviated" href="http://www.HW.cz">www.HW.cz</a>
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a>
      <br>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>