Browse Source

* function result location for syscalls on MOS hopefully correctly set now

florian 21 years ago
parent
commit
b1dc8c5572
2 changed files with 17 additions and 8 deletions
  1. 10 5
      compiler/pdecsub.pas
  2. 7 3
      compiler/powerpc/cpupara.pas

+ 10 - 5
compiler/pdecsub.pas

@@ -76,7 +76,7 @@ implementation
        { aasm }
        aasmbase,
        { symtable }
-       symbase,symtable,defutil,defcmp,paramgr,
+       symbase,symtable,defutil,defcmp,paramgr,cpupara,
        { pass 1 }
        node,htypechk,
        nmat,nadd,ncal,nset,ncnv,ninl,ncon,nld,nflw,
@@ -1164,8 +1164,8 @@ begin
 {$ifdef powerpc}
   if target_info.system in [system_powerpc_morphos,system_m68k_amiga] then
     begin
-     pd.has_paraloc_info:=true;
-     include(pd.procoptions,po_explicitparaloc);
+      pd.has_paraloc_info:=true;
+      include(pd.procoptions,po_explicitparaloc);
       if consume_sym(sym,symtable) then
         begin
           if (sym.typ=varsym) and
@@ -1178,7 +1178,9 @@ begin
             end
           else
             Message(parser_e_32bitint_or_pointer_variable_expected);
-        end;
+         end;
+      (paramanager as tppcparamanager).create_funcret_paraloc_info(pd,calleeside);
+      (paramanager as tppcparamanager).create_funcret_paraloc_info(pd,callerside);
     end;
 {$endif powerpc}
   tprocdef(pd).extnumber:=get_intconst;
@@ -2258,7 +2260,10 @@ const
 end.
 {
   $Log$
-  Revision 1.183  2004-07-14 23:19:21  olle
+  Revision 1.184  2004-07-17 13:51:57  florian
+    * function result location for syscalls on MOS hopefully correctly set now
+
+  Revision 1.183  2004/07/14 23:19:21  olle
     + added external facilities for macpas
 
   Revision 1.182  2004/06/20 08:55:30  florian

+ 7 - 3
compiler/powerpc/cpupara.pas

@@ -42,9 +42,10 @@ unit cpupara;
           function getintparaloc(calloption : tproccalloption; nr : longint) : tparalocation;override;
           function create_paraloc_info(p : tabstractprocdef; side: tcallercallee):longint;override;
           function create_varargs_paraloc_info(p : tabstractprocdef; varargspara:tvarargspara):longint;override;
+
+          procedure create_funcret_paraloc_info(p : tabstractprocdef; side: tcallercallee);
          private
           procedure init_values(var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword);
-          procedure create_funcret_paraloc_info(p : tabstractprocdef; side: tcallercallee);
           function create_paraloc_info_intern(p : tabstractprocdef; side: tcallercallee; firstpara: tparaitem;
               var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword):longint;
           function parseparaloc(p : tparaitem;const s : string) : boolean;override;
@@ -259,7 +260,7 @@ unit cpupara;
         init_values(curintreg,curfloatreg,curmmreg,cur_stack_offset);
 
         result := create_paraloc_info_intern(p,side,tparaitem(p.para.first),curintreg,curfloatreg,curmmreg,cur_stack_offset);
-        
+
         create_funcret_paraloc_info(p,side);
       end;
 
@@ -555,7 +556,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.65  2004-07-09 21:45:24  jonas
+  Revision 1.66  2004-07-17 13:51:57  florian
+    * function result location for syscalls on MOS hopefully correctly set now
+
+  Revision 1.65  2004/07/09 21:45:24  jonas
     * fixed passing of fpu paras on the stack
     * fixed number of fpu parameters passed in registers
     * skip corresponding integer registers when using an fpu register for a