Bläddra i källkod

* tg.direction is always -1 on the Z80

git-svn-id: branches/z80@44908 -
nickysn 5 år sedan
förälder
incheckning
391990e456
2 ändrade filer med 3 tillägg och 14 borttagningar
  1. 2 13
      compiler/z80/cpupi.pas
  2. 1 1
      compiler/z80/tgcpu.pas

+ 2 - 13
compiler/z80/cpupi.pas

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

+ 1 - 1
compiler/z80/tgcpu.pas

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