|
@@ -87,8 +87,17 @@ implementation
|
|
|
{ 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()) }
|
|
|
+ { This is only correct if the hidden funcret parameter
|
|
|
+ is not passed as a register.
|
|
|
+ As it is inserted in parast after all other hidden parameters,
|
|
|
+ it is always the first parameter (apart from hidden parentfp,
|
|
|
+ but this one is never put into a register (vs_nonregable set)
|
|
|
+ so funcret is always in EAX for register calling }
|
|
|
if (target_info.system = system_i386_win32) and
|
|
|
- paramanager.ret_in_param(procdefinition.returndef,procdefinition.proccalloption) then
|
|
|
+ paramanager.ret_in_param(procdefinition.returndef,procdefinition.proccalloption) and
|
|
|
+ not ((procdefinition.proccalloption=pocall_register) or
|
|
|
+ ((procdefinition.proccalloption=pocall_internproc) and
|
|
|
+ (pocall_default=pocall_register))) then
|
|
|
inc(pop_size,sizeof(aint));
|
|
|
|
|
|
{ better than an add on all processors }
|