* tg.direction is always -1 on the Z80

git-svn-id: branches/z80@44908 -
This commit is contained in:
nickysn 2020-04-21 03:02:43 +00:00
parent d3e946b779
commit 391990e456
2 changed files with 3 additions and 14 deletions

View File

@ -54,24 +54,13 @@ unit cpupi;
procedure tcpuprocinfo.set_first_temp_offset;
begin
if tg.direction = -1 then
tg.setfirsttemp(0)
else if not (po_nostackframe in procdef.procoptions) then
tg.setfirsttemp(maxpushedparasize+1)
else
tg.setfirsttemp(maxpushedparasize);
tg.setfirsttemp(0);
end;
function tcpuprocinfo.calc_stackframe_size:longint;
begin
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;
result:=-tg.lasttemp+maxpushedparasize;
end;

View File

@ -53,7 +53,7 @@ uses
procedure ttgz80.setfirsttemp(l: asizeint);
begin
{ this is a negative value normally }
if l*direction<0 then
if l>0 then
internalerror(200204221);
firsttemp:=l;
lasttemp:=l;