[fpc-devel]I suggest a new FPC feature

Jonas Maebe jonas at zeus.rug.ac.be
Thu Oct 11 14:43:51 CEST 2001


On donderdag, oktober 11, 2001, at 02:28 , Jonas Maebe wrote:

>> I'm not yet convinced of it's usefullness. Do not forget that we're 
>> trying to be cross-platform,
>> which means that we should keep in mind conventions on other OS-es, 
>> such as Unix.
>
> Actually, stdcall is *the* standard calling convention for the 80x86 
> architecture, no matter under which OS you run. It defines ebx esi and 
> edi as non-volatile (ie if the callee modifies them, it has to save 
> them first) and eax, ecx and edx as non-volatile (if the caller wants 
> to use their current values after it called the subroutine, it should 
> save them first).

Correction: it's standard as far as the register usage is concerned. I 
don't know whether there's also a standard order (defined by the ABI) of 
pushing the parameters (under C, it's in reverse order compared to 
stdcall IIRC)


Jonas





More information about the fpc-devel mailing list