Browse Source

* fixed allocation of parameters passed by reference for powerpc in
callee

Jonas Maebe 21 years ago
parent
commit
df428f7a5d
2 changed files with 22 additions and 4 deletions
  1. 13 3
      compiler/ncgutil.pas
  2. 9 1
      compiler/powerpc/cpupara.pas

+ 13 - 3
compiler/ncgutil.pas

@@ -1974,8 +1974,14 @@ implementation
                       begin
                         case localloc.loc of
                           LOC_REFERENCE :
-                            list.concat(Tai_comment.Create(strpnew('Para '+realname+' located at '+
-                                std_regname(localloc.reference.index)+tostr_with_plus(localloc.reference.offset))));
+                            begin
+                              list.concat(Tai_comment.Create(strpnew('Para '+realname+' located at '+
+                                  std_regname(localloc.reference.index)+tostr_with_plus(localloc.reference.offset))));
+{$ifdef powerpc}
+                              localloc.size:=paraitem.paraloc[calleeside].size;
+                              tg.GetLocal(list,tcgsize2size[localloc.size],vartype.def,localloc.reference);
+{$endif powerpc}
+                            end;
                         end;
                       end;
                   end;
@@ -2060,7 +2066,11 @@ implementation
 end.
 {
   $Log$
-  Revision 1.182  2004-01-13 18:08:58  florian
+  Revision 1.183  2004-01-17 15:55:10  jonas
+    * fixed allocation of parameters passed by reference for powerpc in
+      callee
+
+  Revision 1.182  2004/01/13 18:08:58  florian
     * x86-64 compilation fixed
 
   Revision 1.181  2004/01/12 22:11:38  peter

+ 9 - 1
compiler/powerpc/cpupara.pas

@@ -380,6 +380,9 @@ unit cpupara;
                  else
                    internalerror(2002071002);
               end;
+{
+              this is filled in in ncgutil
+
               if side = calleeside then
                 begin
                   if (paraloc.loc = LOC_REFERENCE) then
@@ -389,6 +392,7 @@ unit cpupara;
                       inc(paraloc.reference.offset,current_procinfo.calc_stackframe_size);
                     end;
                 end;
+}
               hp.paraloc[side]:=paraloc;
               hp:=tparaitem(hp.next);
            end;
@@ -442,7 +446,11 @@ begin
 end.
 {
   $Log$
-  Revision 1.56  2004-01-15 14:01:18  florian
+  Revision 1.57  2004-01-17 15:55:11  jonas
+    * fixed allocation of parameters passed by reference for powerpc in
+      callee
+
+  Revision 1.56  2004/01/15 14:01:18  florian
     + x86 instruction tables for x86-64 extended
 
   Revision 1.55  2003/12/28 22:09:12  florian