<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue style='word-wrap: break-word;-webkit-nbsp-mode: space;
-webkit-line-break: after-white-space'>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<div>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Chris,</span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>I did not quite understand the “The bad
thing about …” part of your argument. I’m not sure which of
the two scenarios are you comparing (promoting in FrontEnd vs BackEnd) or (promotion
to int vs i32)</span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'> </span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Regardless, I agree with you and shap that
promotions should take place in the FrontEnd and this is my reason:</span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>The standard allows calling a function
without prototype and assumes “int” return value; and I realize
that this is the primary reason why the return value is being promoted. This ties
this promotion to int type and not the size of any register in target, which in
turn makes it a language issue rather than code generation issue; hence
FrontEnd must take care of it.</span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'> </span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Now for our port, things are different. In most
(sane) ports, the target provides an integer class for int… however, things
are different in our (insane) port. We only have an 8-bit data bus but we also
want 16-bit int type. So this promotion will make char return values (which are
used heavily in many application in 8-bit environment) quite inefficient. So we
need a way to turn off this promotion all together and deal with default
function prototype in a different way (perhaps issue a diagnostic …)</span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'> </span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Cheers</span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Ali</span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'> </span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'> </span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>></span></font>The bad thing about doing
this is that, on the caller side, we lose information.  With the current
approach, the caller knows that the value is (for example) 8 <font color=navy><span
style='color:navy'>></span></font>bits but sign or zero extended as
appropriate.  This allows the caller side to do optimizations based on
this fact.  If all return values were i32, we wouldn't <font color=navy><span
style='color:navy'>></span></font>know that the top 24 bits were sign/zero
extended.  I think we can handle this by adding some new attributes, but
this is marginally ugly.</p>

</div>

<div>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>></span></font> </p>

</div>

<div>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>></span></font>What do you think?</p>

</div>

<div>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>></span></font> </p>

</div>

<div>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>></span></font>-Chris</p>

</div>

</div>

</body>

</html>