Browse Source

* moved ARM-specific tprocdef.total_stackframe_size field to cpu-specific
descendant

git-svn-id: trunk@27437 -

Jonas Maebe 11 years ago
parent
commit
5053a39501
4 changed files with 9 additions and 11 deletions
  1. 2 2
      compiler/arm/cpupara.pas
  2. 2 2
      compiler/arm/cpupi.pas
  3. 5 1
      compiler/arm/symcpu.pas
  4. 0 6
      compiler/symdef.pas

+ 2 - 2
compiler/arm/cpupara.pas

@@ -54,7 +54,7 @@ unit cpupara;
 
     uses
        verbose,systems,cutils,
-       defutil,symsym,symtable,
+       defutil,symsym,symcpu,symtable,
        { PowerPC uses procinfo as well in cpupara, so this should not hurt }
        procinfo;
 
@@ -301,7 +301,7 @@ unit cpupara;
         curmmreg:=RS_D0;
 
         if (side=calleeside) and (GenerateThumbCode or (pi_estimatestacksize in current_procinfo.flags)) then
-          cur_stack_offset:=(p as tprocdef).total_stackframe_size
+          cur_stack_offset:=(p as tcpuprocdef).total_stackframe_size
         else
           cur_stack_offset:=0;
         sparesinglereg := NR_NO;

+ 2 - 2
compiler/arm/cpupi.pas

@@ -57,7 +57,7 @@ unit cpupi;
        globals,systems,
        cpubase,
        tgobj,
-       symconst,symtype,symsym,paramgr,
+       symconst,symtype,symsym,symcpu,paramgr,
        cgutils,
        cgobj,
        defutil;
@@ -254,7 +254,7 @@ unit cpupi;
 
     procedure tarmprocinfo.generate_parameter_info;
       begin
-       procdef.total_stackframe_size:=stackframesize;
+       tcpuprocdef(procdef).total_stackframe_size:=stackframesize;
        inherited generate_parameter_info;
       end;
 

+ 5 - 1
compiler/arm/symcpu.pas

@@ -26,7 +26,7 @@ unit symcpu;
 interface
 
 uses
-  symdef,symsym;
+  symdef,symsym,globtype;
 
 type
   { defs }
@@ -91,6 +91,10 @@ type
   tcpuprocvardefclass = class of tcpuprocvardef;
 
   tcpuprocdef = class(tprocdef)
+    { the arm paramanager might need to know the total size of the stackframe
+      to avoid cyclic unit dependencies or global variables, this infomatation is
+      stored in total_stackframe_size }
+    total_stackframe_size : aint;
   end;
   tcpuprocdefclass = class of tcpuprocdef;
 

+ 0 - 6
compiler/symdef.pas

@@ -714,12 +714,6 @@ interface
 {$endif oldregvars}
           import_nr    : word;
           extnumber    : word;
-{$if defined(arm)}
-          { the arm paramanager might need to know the total size of the stackframe
-            to avoid cyclic unit dependencies or global variables, this infomatation is
-            stored in total_stackframe_size }
-          total_stackframe_size : aint;
-{$endif defined(arm)}
           visibility   : tvisibility;
           { set to a value different from tsk_none in case this procdef is for
             a routine that has to be internally generated by the compiler }