mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-19 19:39:36 +01:00
* fixed calling cdecl functions which return a large record with
use_fixed_stack on i386 git-svn-id: trunk@2872 -
This commit is contained in:
parent
659d3e106d
commit
5f0f08dd18
@ -70,7 +70,17 @@ implementation
|
||||
hreg : tregister;
|
||||
begin
|
||||
if (use_fixed_stack) then
|
||||
exit;
|
||||
begin
|
||||
{ very weird: in this case the callee does a "ret $4" and the }
|
||||
{ caller immediately a "subl $4,%esp". Possibly this is for }
|
||||
{ use_fixed_stack code to be able to transparently call }
|
||||
{ old-style code (JM) }
|
||||
dec(pop_size,pushedparasize);
|
||||
if (pop_size < 0) then
|
||||
exprasmlist.concat(taicpu.op_const_reg(A_SUB,S_L,-pop_size,NR_ESP));
|
||||
exit;
|
||||
end;
|
||||
|
||||
{ better than an add on all processors }
|
||||
if pop_size=4 then
|
||||
begin
|
||||
|
||||
@ -1845,8 +1845,7 @@ implementation
|
||||
if current_procinfo.procdef.proccalloption in clearstack_pocalls then
|
||||
begin
|
||||
parasize:=0;
|
||||
if not(use_fixed_stack) and
|
||||
paramanager.ret_in_param(current_procinfo.procdef.rettype.def,current_procinfo.procdef.proccalloption) then
|
||||
if paramanager.ret_in_param(current_procinfo.procdef.rettype.def,current_procinfo.procdef.proccalloption) then
|
||||
inc(parasize,sizeof(aint));
|
||||
end
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user