<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Seems technically straight forward form the LLVM perspective. 
      The only complication is it looks like your callee saved register
      lists are influenced by the number of arguments to the functions. 
      I'm not sure that'll be easy to encode with the current
      infrastructure.  <br>
    </p>
    <p>Philip<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 09/22/2016 12:07 AM, Ben Simhon,
      Oren via llvm-dev wrote:<br>
    </div>
    <blockquote
cite="mid:EB9E992913A6B04E92C0128487B96E21E4E04C@HASMSX105.ger.corp.intel.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        mso-fareast-language:RU;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">Hi
            All,<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">The
            Register Calling Convention (RegCall) was introduced by
            Intel to optimize parameter transfer on function call.<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">This
            calling convention ensures that as many values as possible
            are passed or returned in registers.<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8"><o:p> </o:p></span></p>
        <p class="MsoNormal"
          style="margin-bottom:7.5pt;line-height:16.5pt;background:white">
          <span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">To
            use RegCall, place the keyword before a function
            declaration. For example:<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-bottom:7.5pt;line-height:16.5pt;background:white">
          <i><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">__regcall
              int foo (int i, int j); // Windows OS<o:p></o:p></span></i></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><i><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">__attribute__((regcall))
              foo (int I, int j); // Linux OS and Mac OS X)<o:p></o:p></span></i></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8"><o:p> </o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">The
            calling convention is described in more details here:<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><i><u><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8"><a
                  moz-do-not-send="true"
                  href="https://software.intel.com/en-us/node/693069"><span
                    style="color:#0860A8">https://software.intel.com/en-us/node/693069</span></a><o:p></o:p></span></u></i></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8"><o:p> </o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">We
            are adding support for RegCall calling convention for Clang
            and LLVM IR.<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">The
            first step will include the implementation for LLVM IR.<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8"><o:p> </o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">I
            will appreciate your comments.<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8"><o:p> </o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">Thanks,<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-top:5.0pt;background:white"><span
style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8">Oren<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
      </div>
      <p>---------------------------------------------------------------------<br>
        Intel Israel (74) Limited</p>
      <p>This e-mail and any attachments may contain confidential
        material for<br>
        the sole use of the intended recipient(s). Any review or
        distribution<br>
        by others is strictly prohibited. If you are not the intended<br>
        recipient, please contact the sender and delete all copies.</p>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>