* proper tavrprocinfo.calc_stackframe_size

git-svn-id: trunk@30597 -
This commit is contained in:
florian 2015-04-14 20:48:13 +00:00
parent 3d0b1020d7
commit e733efbbc2

View File

@ -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;