mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 03:11:26 +02:00
* proper tavrprocinfo.calc_stackframe_size
git-svn-id: trunk@30597 -
This commit is contained in:
parent
3d0b1020d7
commit
e733efbbc2
@ -66,8 +66,13 @@ unit cpupi;
|
||||
|
||||
function tavrprocinfo.calc_stackframe_size:longint;
|
||||
begin
|
||||
maxpushedparasize:=align(maxpushedparasize,max(current_settings.alignment.localalignmin,2));
|
||||
result:=Align(tg.direction*tg.lasttemp,max(current_settings.alignment.localalignmin,2))+maxpushedparasize;
|
||||
if tg.lasttemp=2 then
|
||||
{ correct that lasttemp is 2 in case of an empty stack due to the post-decrement pushing and an additional correction
|
||||
in tgobj.setfirsttemp.
|
||||
}
|
||||
result:=maxpushedparasize
|
||||
else
|
||||
result:=tg.direction*tg.lasttemp+maxpushedparasize;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user