[fpc-devel]I suggest a new FPC feature

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


On donderdag, oktober 11, 2001, at 01:29 , Michael Van Canneyt wrote:

>> But please answer to my information: I don't see that you read it. 
>> Summary of my previous messages:
>>
>> 1) Is my $calling patch interesting for you?
>
> 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).

> Constructors are special calls, and should NOT be declared as stdcall.
> The compiler should give an error on this.

I agree here, unless it's possible that constructors are exported from 
libraries, otherwise it will never be possible to use objects/classes 
defined in FPC programs from Delphi ones.


Jonas





More information about the fpc-devel mailing list