[fpc-pascal]Default calling convention

Thomas Schatzl tom_at_work at gmx.at
Fri Jul 2 19:31:08 CEST 2004


Marcel Martin schrieb:
> Peter Vreman a écrit :
> 
>>Check what Delphi does for nested procedures. If it is different from FPC
>>then FPC will be adapted.
>>
> 
> Overall, no :-) Delphi (at least the version 5.01) is bugged. 
 >
 > [example code snipped]

Interestingly, D7 has the same bug.

> I think the best thing that could be done would be to manage so that 
> FPC always makes use of [ebp-something] to access a parameter when 
> the programmer makes use of the parameter name, i,e., with any calling 
> convention the instruction "mov eax,param" should never be coded as 
> "mov eax,reg" but always as "mov eax,[ebp-something]".
> 

See the other answer about the 'pascal' modifier.

Regards,
   Thomas








More information about the fpc-pascal mailing list