[fpc-devel]I suggest a new FPC feature
Michael Van Canneyt
michael.vancanneyt at wisa.be
Thu Oct 11 13:29:43 CEST 2001
On Thu, 11 Oct 2001, Pavel V. Ozerski wrote:
> Hello all,
> I tested which code generates Delphi3 for stdcall procedures. It is more similar to code wich is generated with non-patched
> fpc 1.1 for "default" (declared without any calling-convention-defining keyword) procedures: does not save registers edi, esi, ebx
> (that's true also for export procedures). Btw, what is the mean to save these registers? I do'nt exclude that it can be useful but then,
> I think, 'stdcall' supported with current FPC 1.1 is a special variant of stdcall which must have anoter name, e.g., fpccall. Or it is a
> trick to solve some Win32 callbacks-related problems? Then at least please give a name to 'default anomymous stdcall'!
> 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.
> 2) Current 'Stdcall'-declared constructors are buggy (btw, Delphi 3.0 supports only register constructors) and need to be fixed.
Constructors are special calls, and should NOT be declared as stdcall.
The compiler should give an error on this.
> 3) Inheritance of cdecl methods is also buggy.
This should be checked.
> 4) Evidently declared stdcall procedures/functions are not "pure" stdcalls in reality and differ from "default anonymous stdcalls".
I don't know any specification which says what registers should be saved for stdcall.
So unless there is an official specification, the fpc way of doing may be just as
well as any other...
More information about the fpc-devel