<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>and again my mail got truncated..<BR><BR>Clearly the best option, despite the pessimism, is to mark all struct returning functions has having side affects, as that achieves parity with all the other gcc-based platforms. Optimizing this can be left for later target-independent work that'll probably never happen. Changing the calling convention is almost an option, as there are so few functions in the world foolhardy enough to return structs. If they are all written in Modula-3, then there'd be enough consistency. Sleazy though.<BR>I'll see what PM3 does first.<BR>
 <BR>
 - Jay<BR><BR>
<BLOCKQUOTE>
<HR id=EC_stopSpelling>
Which again, jokingly, strikes at the question -- What is Posix? What do you want from Cygwin?<BR>One thing Cygwin does NOT give you is just one calling convention, alas, this calling convention business stinks. It's not even an NT thing, only an NT386 thing. All the other NT platforms had/have only one calling convention.<BR> <BR>You can't get far on NT386 without needing to support two calling conventions.<BR>The "OS" uses mostly __stdcall -- callee pops -- smaller, faster.<BR>But anything that is varargs, such as printf -- pretty much must use caller pops -- __cdecl.<BR>As well, __cdecl is the default, so prevalent, and used in most C runtime functions.<BR>There is also __fastcall that uses like up to two registers for parameters.<BR> <BR>I have seen a platform in which printf did the pop, and it depended on the number/size of parameters matching the format string. On most platforms, printf("", 1, 2, 3, 4) just does nothing, but on that platform, it'd unbalance the stack and crash.<BR> <BR> - Jay<BR><BR>
<BLOCKQUOTE>
<HR id=EC_EC_stopSpelling>
From: jayk123@hotmail.com<BR>To: hosking@cs.purdue.edu<BR>CC: m3devel@elegosoft.com<BR>Subject: next problem (NT386GNU)<BR>Date: Mon, 21 Jan 2008 05:47:28 +0000<BR><BR>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass EC_body.hmmessage
{font-size:10pt;font-family:Tahoma;}
</STYLE>
M3File.m3<BR> <BR>PROCEDURE IsReadable (path: TEXT): BOOLEAN =<BR>  (* We don't really check for readablitiy, just for existence *)<BR>  BEGIN<BR>    TRY<BR>      EVAL FS.Status (path);    line 82 <BR>      RETURN TRUE;<BR>    EXCEPT OSError.E =><BR>      RETURN FALSE;<BR>    END;<BR>  END IsReadable;<BR> <BR>     -----LINE 82  -----<BR> start_<FONT face="">call_direct</FONT>  p.25 0 Struct<BR> load_address  v.25 0<BR> pop_param  Addr<BR> load   v.26 0 Addr Addr<BR> pop_param  Addr<BR> call_direct  p.25 Struct<BR> pop   Struct<BR><BR><BR><BR>I'm guessing you only see an import for the first call on purpose, but I will compare with PPC_DARWIN:<BR> <BR>     -----LINE 46  -----<BR> import_procedure  FS__Status 2 Struct 0 p.25<BR> declare_indirect  2078421550 -2078421551<BR> declare_param  _return 4 4 Addr 2078421550 F F 50 v.62<BR> declare_param  p 4 4 Addr 1358456180 F F 50 v.63<BR> start_call_direct  p.25 0 Struct<BR> load_address  v.13 0<BR> pop_param  Addr<BR> load   v.14 0 Addr Addr<BR> pop_param  Addr<BR> call_direct  p.25 Struct<BR> pop   Struct<BR><BR> <BR>.globl _M3File__IsReadable<BR> .def _M3File__IsReadable; .scl 2; .type 32; .endef<BR>_M3File__IsReadable:<BR> .stabn 68,0,178,LM93-_M3File__IsReadable<BR>LM93:<BR> pushl %ebp<BR> movl %esp, %ebp<BR> pushl %edi<BR> pushl %esi<BR> pushl %ebx<BR> subl $300, %esp<BR>LBB15:<BR> .stabn 68,0,181,LM94-_M3File__IsReadable<BR>LM94:<BR>L157:<BR> movl -280(%ebp), %eax<BR> andl $0, %eax<BR> orl $_L_1, %eax<BR> movl %eax, -280(%ebp)<BR> movl -284(%ebp), %eax<BR> andl $0, %eax<BR> movl %eax, -284(%ebp)<BR> subl $12, %esp<BR> leal -288(%ebp), %eax<BR> pushl %eax<BR> call _RTHooks__PushEFrame<BR> addl $16, %esp<BR> leal -288(%ebp), %eax<BR> addl $48, %eax<BR> subl $12, %esp<BR> pushl %eax<BR> call __setjmp<BR> addl $16, %esp<BR> testb %al, %al<BR> jne L158<BR> .stabn 68,0,183,LM95-_M3File__IsReadable<BR>LM95:<BR> movl -288(%ebp), %eax<BR> subl $12, %esp<BR> pushl %eax<BR> call _RTHooks__PopEFrame<BR> addl $16, %esp<BR> movl $1, -304(%ebp)<BR> jmp L159<BR>L158:<BR> .stabn 68,0,185,LM96-_M3File__IsReadable<BR>LM96:<BR> movl $0, -304(%ebp)<BR>L159:<BR>LBE15:<BR> movl -304(%ebp), %eax<BR> leal -12(%ebp), %esp<BR> popl %ebx<BR> popl %esi<BR> popl %edi<BR> leave<BR> ret<BR><BR> <BR>M3File.IsReadable's call to FS.Status is omitted, all files are readable, even if they are not openable, therefore it "finds" cm3.cfg in the current directory and then fails to open it..<BR> <BR>later..<BR> ..Jay<BR><BR>
<HR>
Climb to the top of the charts! Play the word scramble challenge with star power. <A href="http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan" target=_blank>Play now!</A> </BLOCKQUOTE><BR>
<HR>
Shed those extra pounds with MSN and The Biggest Loser! <A href="http://biggestloser.msn.com/" target=_blank>Learn more.</A> </BLOCKQUOTE><br /><hr />Need to know the score, the latest news, or you need your HotmailŪ-get your "fix". <a href='http://www.msnmobilefix.com/Default.aspx' target='_new'>Check it out.</a></body>
</html>