Browse Source

* length parameter for copyvaluearray changed to tlocation

peter 21 years ago
parent
commit
8b3e00244f
3 changed files with 22 additions and 13 deletions
  1. 6 3
      compiler/arm/cgcpu.pas
  2. 7 4
      compiler/cgobj.pas
  3. 9 6
      compiler/i386/cgcpu.pas

+ 6 - 3
compiler/arm/cgcpu.pas

@@ -79,7 +79,7 @@ unit cgcpu;
 
         procedure g_flags2reg(list: taasmoutput; size: TCgSize; const f: TResFlags; reg: TRegister); override;
 
-        procedure g_copyvaluepara_openarray(list : taasmoutput;const ref, lenref:treference;elesize:aint);override;
+        procedure g_copyvaluepara_openarray(list : taasmoutput;const ref:treference;const lenloc:tlocation;elesize:aint);override;
         procedure g_proc_entry(list : taasmoutput;localsize : longint;nostackframe:boolean);override;
         procedure g_proc_exit(list : taasmoutput;parasize : longint;nostackframe:boolean); override;
 
@@ -837,7 +837,7 @@ unit cgcpu;
       end;
 
 
-    procedure tcgarm.g_copyvaluepara_openarray(list : taasmoutput;const ref, lenref:treference;elesize:aint);
+    procedure tcgarm.g_copyvaluepara_openarray(list : taasmoutput;const ref:treference;const lenloc:tlocation;elesize:aint);
       begin
       end;
 
@@ -1324,7 +1324,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.54  2004-07-03 19:29:14  florian
+  Revision 1.55  2004-10-11 15:46:45  peter
+    * length parameter for copyvaluearray changed to tlocation
+
+  Revision 1.54  2004/07/03 19:29:14  florian
     * fixed problem with cpu interferences
 
   Revision 1.53  2004/06/20 08:55:31  florian

+ 7 - 4
compiler/cgobj.pas

@@ -384,7 +384,7 @@ unit cgobj;
           procedure g_overflowcheck(list: taasmoutput; const Loc:tlocation; def:tdef); virtual;abstract;
           procedure g_overflowCheck_loc(List:TAasmOutput;const Loc:TLocation;def:TDef;ovloc : tlocation);virtual;
 
-          procedure g_copyvaluepara_openarray(list : taasmoutput;const ref, lenref:treference;elesize:aint);virtual;
+          procedure g_copyvaluepara_openarray(list : taasmoutput;const ref:treference;const lenloc:tlocation;elesize:aint);virtual;
           procedure g_releasevaluepara_openarray(list : taasmoutput;const ref:treference);virtual;
 
           {# Emits instructions when compilation is done in profile
@@ -1888,7 +1888,7 @@ implementation
                             Entry/Exit Code Functions
 *****************************************************************************}
 
-    procedure tcg.g_copyvaluepara_openarray(list : taasmoutput;const ref, lenref:treference;elesize:aint);
+    procedure tcg.g_copyvaluepara_openarray(list : taasmoutput;const ref:treference;const lenloc:tlocation;elesize:aint);
       var
         sizereg,sourcereg,destreg : tregister;
         paraloc1,paraloc2,paraloc3 : TCGPara;
@@ -1902,7 +1902,7 @@ implementation
         destreg:=getintregister(list,OS_ADDR);
 
         { calculate necessary memory }
-        a_load_ref_reg(list,OS_INT,OS_INT,lenref,sizereg);
+        a_load_loc_reg(list,OS_INT,lenloc,sizereg);
         a_op_const_reg(list,OP_ADD,OS_INT,1,sizereg);
         a_op_const_reg(list,OP_IMUL,OS_INT,elesize,sizereg);
         { load source }
@@ -2084,7 +2084,10 @@ finalization
 end.
 {
   $Log$
-  Revision 1.176  2004-10-10 20:31:48  peter
+  Revision 1.177  2004-10-11 15:46:45  peter
+    * length parameter for copyvaluearray changed to tlocation
+
+  Revision 1.176  2004/10/10 20:31:48  peter
     * concatcopy_unaligned maps by default to concatcopy, sparc will
       override it with call to fpc_move
 

+ 9 - 6
compiler/i386/cgcpu.pas

@@ -49,7 +49,7 @@ unit cgcpu;
         procedure g_save_all_registers(list : taasmoutput);override;
         procedure g_restore_all_registers(list : taasmoutput;const funcretparaloc:tcgpara);override;
         procedure g_proc_exit(list : taasmoutput;parasize:longint;nostackframe:boolean);override;
-        procedure g_copyvaluepara_openarray(list : taasmoutput;const ref, lenref:treference;elesize:aint);override;
+        procedure g_copyvaluepara_openarray(list : taasmoutput;const ref:treference;const lenloc:tlocation;elesize:aint);override;
 
         procedure g_exception_reason_save(list : taasmoutput; const href : treference);override;
         procedure g_exception_reason_save_const(list : taasmoutput; const href : treference; a: aint);override;
@@ -299,7 +299,7 @@ unit cgcpu;
       end;
 
 
-    procedure tcg386.g_copyvaluepara_openarray(list : taasmoutput;const ref, lenref:treference;elesize:aint);
+    procedure tcg386.g_copyvaluepara_openarray(list : taasmoutput;const ref:treference;const lenloc:tlocation;elesize:aint);
       var
         power,len  : longint;
         opsize : topsize;
@@ -309,7 +309,7 @@ unit cgcpu;
       begin
         { get stack space }
         getcpuregister(list,NR_EDI);
-        list.concat(Taicpu.op_ref_reg(A_MOV,S_L,lenref,NR_EDI));
+        a_load_loc_reg(list,OS_INT,lenloc,NR_EDI);
         list.concat(Taicpu.op_reg(A_INC,S_L,NR_EDI));
         if (elesize<>1) then
          begin
@@ -338,7 +338,7 @@ unit cgcpu;
              ungetcpuregister(list,NR_EDI);
              { now reload EDI }
              getcpuregister(list,NR_EDI);
-             list.concat(Taicpu.op_ref_reg(A_MOV,S_L,lenref,NR_EDI));
+             a_load_loc_reg(list,OS_INT,lenloc,NR_EDI);
              list.concat(Taicpu.op_reg(A_INC,S_L,NR_EDI));
 
              if (elesize<>1) then
@@ -362,7 +362,7 @@ unit cgcpu;
         getcpuregister(list,NR_ESI);
 
         { load count }
-        a_load_ref_reg(list,OS_INT,OS_INT,lenref,NR_ECX);
+        a_load_loc_reg(list,OS_INT,lenloc,NR_ECX);
 
         { load source }
         a_load_ref_reg(list,OS_INT,OS_INT,ref,NR_ESI);
@@ -556,7 +556,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.54  2004-10-05 20:41:01  peter
+  Revision 1.55  2004-10-11 15:46:45  peter
+    * length parameter for copyvaluearray changed to tlocation
+
+  Revision 1.54  2004/10/05 20:41:01  peter
     * more spilling rewrites
 
   Revision 1.53  2004/09/25 14:23:54  peter