Message-ID: From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: stdcall vs cdecl (-mrtd switch) Date: Mon, 6 Apr 1998 15:37:01 +0100 MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk Alberto Chessa writes: > There is a way to use -mrtd with the standard library or I have to > get lib source and recompile ? It's actually even worse than just having to recompile libc, because some functions (eg. most of the __dpmi_*() routines) are coded in asm. You will need to modify all these before it can work with a different calling convention. If I remember correctly, someone did some research about this a year or so ago, so you may be able to find some useful info in the mail archives. I think that after running some tests they discarded the plan, though, because they found very little difference between the stdcall and the register-based convention. Passing parameters via registers is only a real saving if you have enough registers to do it properly: with only six general registers in the Intel, I suspect you will find that stdcall is perfectly efficient for anything longer than a couple of lines (very small functions should of course be inlined). Shawn Hargreaves.