<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=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Calibri Light";
        panose-1:2 15 3 2 2 2 4 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Arial\,";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
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.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        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;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:384910795;
        mso-list-type:hybrid;
        mso-list-template-ids:304514188 627374222 69009411 69009413 69009409 69009411 69009413 69009409 69009411 69009413;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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 lang="SV" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Dear community,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">My company is interested in porting LLVM to OpenVMS. To do so, we need to look at extending the AMD64 calling convention to suit the existing calling conventions available on OpenVMS.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">We realize LLVM is a big and complex project and for some people who has not worked on it before, it’s going to be a big and tough job that is going to take a lot of time. Still, the job has to be done and we have to
 start somewhere, so any help or direction would be great.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Now, as to what we need:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><![if !supportLists]><span lang="EN-GB"><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">         
</span></span></span><![endif]><span lang="EN-GB">To pass the argument count to the callee<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><![if !supportLists]><span lang="EN-GB"><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">         
</span></span></span><![endif]><span lang="EN-GB">Reserving registers for mapping variables directly to them<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">We need to look at passing the argument count (i.e. number of arguments passed) to functions in some register. One way that we have considered is to use the second byte of AL to hold the argument count. Do you think that
 would work well with how LLVM works today? Or is there an alternative way that you would suggest?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">We also need to look at reserving registers because existing OpenVMS code relies on being able to map variables directly to registers so that multiple functions can share variables directly inside registers. We may need
 to reserve up to as many as 6 registers. Do you think this might work? Or will this make codegen bad? We have also considered trying to put these variables into an array and reserving a global variable to index into this array, thereby emulating this feature.
 Do you think this will work better?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">It would be great to get some information to cut down on the area we need to concentrate on to get started. Any help or direction would be great.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<div style="border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="margin-top:12.0pt;page-break-after:avoid"><a name="_Toc454264584"><span style="font-size:16.0pt;font-family:"Times New Roman",serif;color:#A5A5A5">Regards,<br>
Patrik Eklöf</span></a><span style="mso-bookmark:_Toc454264584"></span><span style="font-size:16.0pt;font-family:"Calibri Light",sans-serif;color:#A5A5A5"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="mso-fareast-language:SV"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;mso-fareast-language:SV"><o:p> </o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="604" style="width:453.25pt">
<tbody>
<tr style="height:86.6pt">
<td width="191" valign="top" style="width:143.0pt;padding:6.0pt 6.0pt 0cm 0cm;height:86.6pt">
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:120%"><b><span lang="EN-US" style="font-size:8.5pt;line-height:120%;font-family:"Arial",sans-serif;color:#2A2A2A;mso-fareast-language:SV">Patrik Eklöf</span></b><span lang="EN-US" style="mso-fareast-language:SV"><br>
</span><span lang="EN-US" style="font-size:8.5pt;line-height:120%;font-family:"Arial",sans-serif;color:#2A2A2A;mso-fareast-language:SV">Programmer</span><span lang="EN-US" style="mso-fareast-language:SV"><br>
</span><b><span lang="EN-US" style="font-size:8.5pt;line-height:120%;font-family:"Arial",sans-serif;color:#2A2A2A;mso-fareast-language:SV">Tel.</span></b><span lang="EN-US" style="font-size:8.5pt;line-height:120%;font-family:"Arial",sans-serif;color:#2A2A2A;mso-fareast-language:SV"> +46 720
 514440</span><span lang="EN-US" style="mso-fareast-language:SV"><br>
<br>
</span><a href="https://www.linkedin.com/company/energy-machines"><span lang="EN-US" style="font-size:8.5pt;line-height:120%;font-family:"Arial",sans-serif;color:#00B050;mso-fareast-language:SV">My LinkedIn</span></a><u><span lang="EN-US" style="font-family:"Arial",sans-serif;color:#00B050;mso-fareast-language:SV"><o:p></o:p></span></u></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><a href="mailto:patrik.eklof@energymachines.com"><span style="font-size:8.5pt;line-height:115%;font-family:"Arial",sans-serif;color:#00B050;mso-fareast-language:SV">patrik.eklof@energymachines.com</span></a><span style="color:#2A2A2A;mso-fareast-language:SV"><o:p></o:p></span></p>
</td>
<td width="414" valign="top" style="width:310.25pt;border:none;border-left:solid #E2EFD9 1.0pt;padding:0cm 15.0pt 3.0pt 15.0pt;height:86.6pt">
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="mso-fareast-language:SV"><img border="0" width="358" height="74" style="width:3.7291in;height:.7708in" id="picture" src="cid:image001.png@01D26A6E.37267620" alt="cid:image001.png@01D26A6E.37267620"></span><span lang="EN-US" style="mso-fareast-language:SV"><br>
</span><span lang="EN-US" style="font-size:8.5pt;line-height:115%;font-family:"Arial\,";color:#2A2A2A;mso-fareast-language:SV">Skeppsgatan 19, SE-211 11 Malmö, Sweden</span><span lang="EN-US" style="mso-fareast-language:SV"><br>
</span><a href="http://energymachines.com/"><span lang="EN-US" style="font-size:8.5pt;line-height:115%;font-family:"Arial",sans-serif;color:#00B050;mso-fareast-language:SV">www.energymachines.com</span></a><span lang="EN-US" style="font-size:8.5pt;line-height:115%;font-family:"Arial",sans-serif;color:#00B050;mso-fareast-language:SV">  |  </span><a href="https://www.linkedin.com/company/energy-machines"><span lang="EN-US" style="font-size:8.5pt;line-height:115%;font-family:"Arial",sans-serif;color:#00B050;mso-fareast-language:SV">LinkedIn</span></a><span lang="EN-US" style="font-size:8.5pt;line-height:115%;font-family:"Arial",sans-serif;color:#2A2A2A;mso-fareast-language:SV"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:1.0pt">
<td colspan="2" style="padding:18.75pt 0cm 0cm 0cm;height:1.0pt">
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span lang="EN-US" style="font-size:7.5pt;line-height:115%;font-family:"Arial",sans-serif;color:#2A2A2A;mso-fareast-language:SV">The information in this e-mail and any of its attachments is
 strictly confidential and intended solely for the person or organisation to whom it is addressed. Access to this email by anyone else is unauthorised. If you are not the intended recipient, you must not copy or distribute it or take action in reliance on it.
 If you have received this e-mail in error, please notify the sender as soon as possible. Communication via e-mail over the internet is not secure and messages may be read, manipulated or otherwise compromised by third parties. Energy Machines Sweden AB does
 not accept any responsibility in this eventuality.<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:SV"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
</body>
</html>