瀏覽代碼

* fixed open arrays when using register variables

florian 21 年之前
父節點
當前提交
7b8c44bbce
共有 3 個文件被更改,包括 19 次插入9 次删除
  1. 7 4
      compiler/cgobj.pas
  2. 6 2
      compiler/ncgutil.pas
  3. 6 3
      compiler/x86/cgx86.pas

+ 7 - 4
compiler/cgobj.pas

@@ -372,7 +372,7 @@ unit cgobj;
           procedure g_overflowCheck_loc(List:TAasmOutput;const Loc:TLocation;def:TDef;ovloc : tlocation);virtual;
 
           procedure g_copyvaluepara_openarray(list : taasmoutput;const ref:treference;const lenloc:tlocation;elesize:aint;destreg:tregister);virtual;
-          procedure g_releasevaluepara_openarray(list : taasmoutput;const ref:treference);virtual;
+          procedure g_releasevaluepara_openarray(list : taasmoutput;const l:tlocation);virtual;
 
           {# Emits instructions when compilation is done in profile
              mode (this is set as a command line option). The default
@@ -1896,7 +1896,7 @@ implementation
       end;
 
 
-    procedure tcg.g_releasevaluepara_openarray(list : taasmoutput;const ref:treference);
+    procedure tcg.g_releasevaluepara_openarray(list : taasmoutput;const l:tlocation);
       var
         paraloc1 : TCGPara;
       begin
@@ -1905,7 +1905,7 @@ implementation
         paramanager.getintparaloc(pocall_default,1,paraloc1);
         { load source }
         paramanager.allocparaloc(list,paraloc1);
-        a_param_ref(list,OS_ADDR,ref,paraloc1);
+        a_param_loc(list,l,paraloc1);
         paramanager.freeparaloc(list,paraloc1);
         alloccpuregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
         alloccpuregisters(list,R_FPUREGISTER,paramanager.get_volatile_registers_fpu(pocall_default));
@@ -2039,7 +2039,10 @@ finalization
 end.
 {
   $Log$
-  Revision 1.184  2004-11-02 17:25:36  florian
+  Revision 1.185  2004-11-08 20:23:29  florian
+    * fixed open arrays when using register variables
+
+  Revision 1.184  2004/11/02 17:25:36  florian
     * <signed type> to qword range check for 64 bit targets fixed
 
   Revision 1.183  2004/10/31 21:45:02  peter

+ 6 - 2
compiler/ncgutil.pas

@@ -943,6 +943,7 @@ implementation
       var
         list : TAAsmoutput;
         href : treference;
+        l : tlocation;
       begin
         list:=taasmoutput(arg);
         if (tsym(p).typ=varsym) and
@@ -965,7 +966,7 @@ implementation
             { cdecl functions don't have a high pointer so it is not possible to generate
               a local copy }
             if not(current_procinfo.procdef.proccalloption in [pocall_cdecl,pocall_cppdecl]) then
-              cg.g_releasevaluepara_openarray(list,tvarsym(p).localloc.reference);
+              cg.g_releasevaluepara_openarray(list,tvarsym(p).localloc);
           end;
       end;
 
@@ -2211,7 +2212,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.236  2004-11-04 17:12:24  peter
+  Revision 1.237  2004-11-08 20:23:29  florian
+    * fixed open arrays when using register variables
+
+  Revision 1.236  2004/11/04 17:12:24  peter
   forgot if cs_debuginfo
 
   Revision 1.235  2004/11/04 17:09:54  peter

+ 6 - 3
compiler/x86/cgx86.pas

@@ -105,7 +105,7 @@ unit cgx86;
         procedure g_concatcopy(list : taasmoutput;const source,dest : treference;len : aint);override;
 
         { entry/exit code helpers }
-        procedure g_releasevaluepara_openarray(list : taasmoutput;const ref:treference);override;
+        procedure g_releasevaluepara_openarray(list : taasmoutput;const l:tlocation);override;
         procedure g_profilecode(list : taasmoutput);override;
         procedure g_stackpointer_alloc(list : taasmoutput;localsize : longint);override;
         procedure g_proc_entry(list : taasmoutput;localsize : longint;nostackframe:boolean);override;
@@ -1542,7 +1542,7 @@ unit cgx86;
                               Entry/Exit Code Helpers
 ****************************************************************************}
 
-    procedure tcgx86.g_releasevaluepara_openarray(list : taasmoutput;const ref:treference);
+    procedure tcgx86.g_releasevaluepara_openarray(list : taasmoutput;const l:tlocation);
       begin
         { Nothing to release }
       end;
@@ -1733,7 +1733,10 @@ unit cgx86;
 end.
 {
   $Log$
-  Revision 1.138  2004-11-02 20:50:54  florian
+  Revision 1.139  2004-11-08 20:23:29  florian
+    * fixed open arrays when using register variables
+
+  Revision 1.138  2004/11/02 20:50:54  florian
     + added profiler call for x86_64
 
   Revision 1.137  2004/11/02 18:23:16  florian