<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div><font face="Calibri">Our calling convention handling seems kind of messed up.</font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri"> results_on_left: this could be removed;</font></div><div><font face="Calibri"> frontend could presume backends know how to return structs by value</font></div><div><font face="Calibri"> It appears we set it "wrong" currently, e.g. on AMD64_DARWIN,</font></div><div><font face="Calibri"> but it only matters for interop with unusual C code.</font></div><div><font face="Calibri"> </font></div><div><font face="Calibri"> </font></div><div><font face="Calibri"> standard_structs: this could be removed;</font></div><div><font face="Calibri"> frontend could presume backend can pass structs by value</font></div><div><font face="Calibri"> m3x86 already implements this</font></div><div><font face="Calibri"> It should be easier for most other backends, including m3cc.</font></div><div><font face="Calibri"> </font></div><div><font face="Calibri"> </font></div><div><font face="Calibri"> args_left_to_right: this could be removed;</font></div><div><font face="Calibri"> frontend could presume it is always true, and backend could</font></div><div><font face="Calibri"> do the reversing; m3cc already does</font></div><div><font face="Calibri"> It is currently a convenience for M3x86.m3 though.</font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri">Which leaves the only thing about a calling convention its name/id.</font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri">And then, as I proposed years ago, you might as well let all</font></div><div><font face="Calibri">platforms support all calling convention names, even if they</font></div><div><font face="Calibri">are meaningless. That way you could unfork large swaths of <*extern*></font></div><div><font face="Calibri">that vary only because Win32 specifies a calling convention.</font></div><div><font face="Calibri">Heck, look at how NT/amd64 C compiler works -- it accepts and ignores</font></div><div><font face="Calibri">calling conventions too, for source compatibility with NT/x86.</font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri">(You see, I'm looking at all the code that looks at "backend mode".)</font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri"> - Jay</font></div><br><br> </div></body>
</html>