Browse Source

* hidden parameters can be put now in registers as well

florian 20 years ago
parent
commit
1f4e15705c
2 changed files with 16 additions and 7 deletions
  1. 8 2
      compiler/ncgmem.pas
  2. 8 5
      compiler/pdecsub.pas

+ 8 - 2
compiler/ncgmem.pas

@@ -190,10 +190,13 @@ implementation
                 hsym:=tparavarsym(currpi.procdef.parast.search('parentfp'));
                 if not assigned(hsym) then
                   internalerror(200309282);
+                {
                 if hsym.localloc.loc<>LOC_REFERENCE then
                   internalerror(200309283);
+
                 reference_reset_base(href,location.register,hsym.localloc.reference.offset);
-                cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,href,location.register);
+                }
+                cg.a_load_loc_reg(exprasmlist,OS_ADDR,hsym.localloc,location.register);
               end;
           end;
       end;
@@ -861,7 +864,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.104  2005-02-14 17:13:06  peter
+  Revision 1.105  2005-04-06 19:09:39  florian
+    * hidden parameters can be put now in registers as well
+
+  Revision 1.104  2005/02/14 17:13:06  peter
     * truncate log
 
 }

+ 8 - 5
compiler/pdecsub.pas

@@ -2069,10 +2069,6 @@ const
             end;
          end;
 
-        { Make var parameters regable, this must be done after the calling
-          convention is set. }
-        pd.parast.foreach_static(@set_addr_param_regable,pd);
-
         { insert hidden high parameters }
         pd.parast.foreach_static(@insert_hidden_para,pd);
 
@@ -2085,6 +2081,10 @@ const
         { insert parentfp parameter if required }
         insert_parentfp_para(pd);
 
+        { Make var parameters regable, this must be done after the calling
+          convention is set. }
+        pd.parast.foreach_static(@set_addr_param_regable,pd);
+
         { Calculate parameter tlist }
         pd.calcparas;
       end;
@@ -2458,7 +2458,10 @@ const
 end.
 {
   $Log$
-  Revision 1.231  2005-03-27 14:10:52  jonas
+  Revision 1.232  2005-04-06 19:09:39  florian
+    * hidden parameters can be put now in registers as well
+
+  Revision 1.231  2005/03/27 14:10:52  jonas
     * const record parameters > 8 bytes are now passed by reference for non
       cdecl/cppdecl procedures on Mac OS/Mac OS X to fix compatibility with
       GPC (slightly more efficient than Metrowerks behaviour below, but