[fpc-devel]I suggest a new FPC feature

Peter Vreman peter at freepascal.org
Thu Oct 11 13:01:14 CEST 2001


> 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'!

Delphi always saves ebx,esi,edi and therefor doesn't need to insert extra pushes. FPC uses
all available registers and for stdcall it has to insert the pushes to save the original
value.

Maybe only changing the order of the pushes and the call to FPC_NEW_CLASS can already
solve your problem with constructor and stdcall. But i don't have time to test if it
works.








More information about the fpc-devel mailing list