mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 14:27:59 +02:00
* tg.direction is always -1 on the Z80
git-svn-id: branches/z80@44908 -
This commit is contained in:
parent
d3e946b779
commit
391990e456
@ -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;
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user