Browse Source

0002 Added base for Reg Off calculation to paramgr

git-svn-id: branches/interfacertti@30817 -
steve 10 years ago
parent
commit
4e1d65892b
2 changed files with 16 additions and 3 deletions
  1. 8 3
      compiler/ncgrtti.pas
  2. 8 0
      compiler/paramgr.pas

+ 8 - 3
compiler/ncgrtti.pas

@@ -73,7 +73,8 @@ implementation
        fmodule, procinfo,
        fmodule, procinfo,
        aasmtai,aasmdata,
        aasmtai,aasmdata,
        defutil,
        defutil,
-       wpobase
+       wpobase,
+       paramgr
        ;
        ;
 
 
 
 
@@ -504,14 +505,18 @@ implementation
                   begin
                   begin
                     para:=tparavarsym(def.paras[k]);
                     para:=tparavarsym(def.paras[k]);
 
 
+                    if (vo_is_hidden_para in para.varoptions) and not
+                       (vo_is_self in para.varoptions) then
+                      continue;
+
                     { write flags for current parameter }
                     { write flags for current parameter }
                     write_param_flag(para);
                     write_param_flag(para);
                     maybe_write_align;
                     maybe_write_align;
                     { write param type }
                     { write param type }
                     write_rtti_reference(para.vardef,fullrtti);
                     write_rtti_reference(para.vardef,fullrtti);
 
 
-                    reg:=0;
-                    off:=0;
+                    paramanager.get_para_regoff(def.proccalloption, para.paraloc[callerside].location,reg,off);
+
                     current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(reg));
                     current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(reg));
                     current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_32bit(off));
                     current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_32bit(off));
 
 

+ 8 - 0
compiler/paramgr.pas

@@ -81,6 +81,8 @@ unit paramgr;
           function get_volatile_registers_flags(calloption : tproccalloption):tcpuregisterset;virtual;
           function get_volatile_registers_flags(calloption : tproccalloption):tcpuregisterset;virtual;
           function get_volatile_registers_mm(calloption : tproccalloption):tcpuregisterset;virtual;
           function get_volatile_registers_mm(calloption : tproccalloption):tcpuregisterset;virtual;
 
 
+          procedure get_para_regoff(proccalloption: tproccalloption; paraloc: pcgparalocation; out reg: Byte; out off: LongInt);virtual;
+
           procedure getintparaloc(list: TAsmList; pd: tabstractprocdef; nr : longint; var cgpara: tcgpara);virtual;
           procedure getintparaloc(list: TAsmList; pd: tabstractprocdef; nr : longint; var cgpara: tcgpara);virtual;
 
 
           {# allocate an individual pcgparalocation that's part of a tcgpara
           {# allocate an individual pcgparalocation that's part of a tcgpara
@@ -278,6 +280,12 @@ implementation
         result:=[];
         result:=[];
       end;
       end;
 
 
+    procedure tparamanager.get_para_regoff(proccalloption: tproccalloption; paraloc: pcgparalocation; out reg: Byte; out off: LongInt);
+    begin
+      reg:=0;
+      off:=0;
+    end;
+
 {$if first_mm_imreg = 0}
 {$if first_mm_imreg = 0}
   {$WARN 4044 OFF} { Comparison might be always false ... }
   {$WARN 4044 OFF} { Comparison might be always false ... }
 {$endif}
 {$endif}