mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 08:30:54 +02:00
* fixed calling cdecl routines under win32 which return their result in
a structure whose address is passed by the caller (the caller is responsible there to remove the address from the stack, unlike on e.g. linux/i386 and darwin/i386) (mantis #9013) git-svn-id: trunk@7667 -
This commit is contained in:
parent
b034a88c9c
commit
02adc2b6ab
@ -81,6 +81,16 @@ implementation
|
||||
exit;
|
||||
end;
|
||||
|
||||
{ on win32, the caller is responsible for removing the funcret }
|
||||
{ pointer from the stack, unlike on Linux. Don't know about }
|
||||
{ elsewhere (except Darwin, handled above), but since the default }
|
||||
{ was "callee removes funcret pointer from stack" until now, we'll }
|
||||
{ keep that default for everyone else (ncgcal decreases popsize by }
|
||||
{ sizeof(aint) in case of ret_in_param()) }
|
||||
if (target_info.system = system_i386_win32) and
|
||||
paramanager.ret_in_param(procdefinition.returndef,procdefinition.proccalloption) then
|
||||
inc(pop_size,sizeof(aint));
|
||||
|
||||
{ better than an add on all processors }
|
||||
if pop_size=4 then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user