* patch by Jeppe Johanse to take care of the fact that push is post-decrement on avr

git-svn-id: trunk@30548 -
This commit is contained in:
florian 2015-04-11 20:59:27 +00:00
parent 886e3e8d02
commit e34bd746ed

View File

@ -56,7 +56,9 @@ unit cpupi;
procedure tavrprocinfo.set_first_temp_offset;
begin
if tg.direction = -1 then
tg.setfirsttemp(0)
tg.setfirsttemp(-1)
else if not (po_nostackframe in procdef.procoptions) then
tg.setfirsttemp(maxpushedparasize+1)
else
tg.setfirsttemp(maxpushedparasize);
end;
@ -64,8 +66,8 @@ unit cpupi;
function tavrprocinfo.calc_stackframe_size:longint;
begin
maxpushedparasize:=align(maxpushedparasize,max(current_settings.alignment.localalignmin,4));
result:=Align(tg.direction*tg.lasttemp,max(current_settings.alignment.localalignmin,4))+maxpushedparasize;
maxpushedparasize:=align(maxpushedparasize,max(current_settings.alignment.localalignmin,2));
result:=Align(tg.direction*tg.lasttemp,max(current_settings.alignment.localalignmin,2))+maxpushedparasize;
end;