<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<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;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 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;
color:black;
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;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;
mso-fareast-language:RU;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@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]-->
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thanks, Philip, for pointing it out.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">You are correct. We have a task to add the relevant infrastructure.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Currently registers are statically defined as callee/caller saved.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">In order to take into account which registers were passed as parameter we need to add relevant infrastructure.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Only then LLVM will ensure RegCall cross-compiler Interoperability.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thanks again,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Oren<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">
Philip Reames [mailto:listmail@philipreames.com] <br>
<b>Sent:</b> Sunday, September 25, 2016 02:08<br>
<b>To:</b> Ben Simhon, Oren <oren.ben.simhon@intel.com>; llvm-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [llvm-dev] RFC: Adding Register Calling Convention Support<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<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.
<o:p></o:p></p>
<p>Philip<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 09/22/2016 12:07 AM, Ben Simhon, Oren via llvm-dev wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<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,</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-top:5.0pt;background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></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.</span><o:p></o:p></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.</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-top:5.0pt;background:white"><span style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8"> </span><o:p></o:p></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:</span><o:p></o:p></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</span></i><o:p></o:p></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)</span></i><o:p></o:p></p>
<p class="MsoNormal" style="margin-top:5.0pt;background:white"><span style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8"> </span><o:p></o:p></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:</span><o:p></o:p></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 href="https://software.intel.com/en-us/node/693069"><span style="color:#0860A8">https://software.intel.com/en-us/node/693069</span></a></span></u></i><o:p></o:p></p>
<p class="MsoNormal" style="margin-top:5.0pt;background:white"><span style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8"> </span><o:p></o:p></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.</span><o:p></o:p></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.</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-top:5.0pt;background:white"><span style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8"> </span><o:p></o:p></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.</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-top:5.0pt;background:white"><span style="font-size:13.0pt;font-family:"Helvetica",sans-serif;color:#0860A8"> </span><o:p></o:p></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,</span><o:p></o:p></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</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<p>---------------------------------------------------------------------<br>
Intel Israel (74) Limited<o:p></o:p></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.<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>LLVM Developers mailing list<o:p></o:p></pre>
<pre><a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><o:p></o:p></pre>
<pre><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span style="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></body>
</html>