Browse Source

* set firsttempoffset properly for use_fixed_stack

git-svn-id: trunk@2853 -
Jonas Maebe 19 years ago
parent
commit
6e58ad4a12
1 changed files with 13 additions and 1 deletions
  1. 13 1
      compiler/i386/cpupi.pas

+ 13 - 1
compiler/i386/cpupi.pas

@@ -33,6 +33,7 @@ unit cpupi;
     type
     type
        ti386procinfo = class(tcgprocinfo)
        ti386procinfo = class(tcgprocinfo)
          constructor create(aparent:tprocinfo);override;
          constructor create(aparent:tprocinfo);override;
+         procedure set_first_temp_offset;override;
          function calc_stackframe_size:longint;override;
          function calc_stackframe_size:longint;override;
          procedure generate_parameter_info;override;
          procedure generate_parameter_info;override;
        end;
        end;
@@ -45,7 +46,8 @@ unit cpupi;
       systems,globals,
       systems,globals,
       tgobj,
       tgobj,
       cpubase,
       cpubase,
-      cgutils;
+      cgutils,
+      symconst;
 
 
     constructor ti386procinfo.create(aparent:tprocinfo);
     constructor ti386procinfo.create(aparent:tprocinfo);
       begin
       begin
@@ -54,6 +56,16 @@ unit cpupi;
       end;
       end;
 
 
 
 
+    procedure ti386procinfo.set_first_temp_offset;
+      begin
+        if use_fixed_stack then
+          begin
+            if not(po_assembler in procdef.procoptions) then
+              tg.setfirsttemp(tg.direction*maxpushedparasize);
+          end;
+      end;
+
+
     function ti386procinfo.calc_stackframe_size:longint;
     function ti386procinfo.calc_stackframe_size:longint;
       begin
       begin
         { align to 4 bytes at least
         { align to 4 bytes at least