<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>For a reference, it's the <span class="st">/Gv compiler option:
        <a class="moz-txt-link-freetext" href="https://docs.microsoft.com/en-us/cpp/cpp/vectorcall?view=vs-2019">https://docs.microsoft.com/en-us/cpp/cpp/vectorcall?view=vs-2019</a><br>
      </span></p>
    <p>If anything it's proving to be an interesting study case on how
      to make something optimal when given code that doesn't give the
      compiler many clues.  Granted, given the sample function, I'm
      envisioning some node-level optimisation and auto-inlining.</p>
    <p>Gareth aka. Kit<br>
    </p>
    <div class="moz-cite-prefix">On 02/04/2020 16:48, J. Gareth Moreton
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:17f91365-d570-f1fb-63d0-076490c36508@moreton-family.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Apologies - I wasn't clear.  There is an option in the MSVC
        compiler to default to vectorcall, but you have to specify it.</p>
      <p>Gareth aka. Kit<br>
      </p>
      <div class="moz-cite-prefix">On 02/04/2020 16:16, Sven Barth via
        fpc-devel wrote:<br>
      </div>
      <blockquote type="cite"
cite="mid:CAFMUeB8swG85KkB-+uOCUw3oc1jN=J+ts4f6SZUXaXU5fSHoPA@mail.gmail.com">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <div dir="auto">
          <div class="gmail_quote" dir="auto">
            <div dir="ltr" class="gmail_attr">Sven Barth <<a
                href="mailto:pascaldragon@googlemail.com"
                moz-do-not-send="true">pascaldragon@googlemail.com</a>>
              schrieb am Do., 2. Apr. 2020, 17:10:</div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="auto">
                <div dir="auto">
                  <div class="gmail_quote">
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">P.S.
                      Of course you can force it by forcing the vector
                      to be an m128 type <br>
                      and specifying vectorcall for x86_64-win64, but
                      not everyone will know <br>
                      to do that and it gets unwieldly rather quickly. 
                      Speaking of <br>
                      vectorcall, I'm wondering if we can introduce
                      'fastcall' as an alias for <br>
                      'ms_abi_default', mostly so if we follow Microsoft
                      Visual C++'s example <br>
                      of automatically making all routines vectorcall
                      (which is closer to the <br>
                      System V ABI used by linux and will make
                      vectorisation easier), we can <br>
                      force the default one if we need a routine that,
                      say, has to interface <br>
                      with a third-party library ('fastcall' under win32
                      is what the MS ABI is <br>
                      based off... first parameter in ECX, second in EDX
                      and everything else <br>
                      on the stack).<br>
                    </blockquote>
                  </div>
                </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto">Please provide a source for your
                  statement that MSVC uses vectorcall by default. Cause
                  I highly doubt that as Microsoft is huge on backwards
                  compatibility especially regarding the lower level
                  stuff. </div>
              </div>
            </blockquote>
          </div>
          <div dir="auto"><br>
          </div>
          <div dir="auto">Just checked myself: cdecl is the default. So
            nothing needs to be changed here for us. </div>
          <div dir="auto"><br>
          </div>
          <div dir="auto">Regards, </div>
          <div dir="auto">Sven </div>
          <div class="gmail_quote" dir="auto">
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="auto">
                <div dir="auto">
                  <div class="gmail_quote">
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    </blockquote>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
fpc-devel maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org" moz-do-not-send="true">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel" moz-do-not-send="true">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
</pre>
      </blockquote>
      <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
        <table style="border-top: 1px solid #D3D4DE;">
          <tbody>
            <tr>
              <td style="width: 55px; padding-top: 13px;"><a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
                  target="_blank" moz-do-not-send="true"><img
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"
                    alt="" style="width: 46px; height: 29px;"
                    moz-do-not-send="true" width="46" height="29"></a></td>
              <td style="width: 470px; padding-top: 12px; color:
                #41424e; font-size: 13px; font-family: Arial, Helvetica,
                sans-serif; line-height: 18px;">Virus-free. <a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
                  target="_blank" style="color: #4453ea;"
                  moz-do-not-send="true">www.avast.com</a> </td>
            </tr>
          </tbody>
        </table>
        <a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1"
          height="1" moz-do-not-send="true"> </a></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
fpc-devel maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
</pre>
    </blockquote>
  </body>
</html>