Browse Source

* ttempcreatenode.create_reg merged into .create with parameter
whether a register is allowed
* funcret_paraloc renamed to funcretloc

peter 21 years ago
parent
commit
89b1b583c9

+ 11 - 6
compiler/arm/cpupara.pas

@@ -384,14 +384,14 @@ unit cpupara;
           retcgsize:=OS_ADDR
           retcgsize:=OS_ADDR
         else
         else
           retcgsize:=def_cgsize(p.rettype.def);
           retcgsize:=def_cgsize(p.rettype.def);
-        p.funcret_paraloc[side].reset;
-        p.funcret_paraloc[side].Alignment:=std_param_align;
-        p.funcret_paraloc[side].size:=retcgsize;
+        p.funcretloc[side].reset;
+        p.funcretloc[side].Alignment:=std_param_align;
+        p.funcretloc[side].size:=retcgsize;
         { void has no location }
         { void has no location }
         if is_void(p.rettype.def) then
         if is_void(p.rettype.def) then
           exit;
           exit;
         { Function return }
         { Function return }
-        paraloc:=p.funcret_paraloc[side].add_location;
+        paraloc:=p.funcretloc[side].add_location;
 
 
         { Return in FPU register? }
         { Return in FPU register? }
         if p.rettype.def.deftype=floatdef then
         if p.rettype.def.deftype=floatdef then
@@ -410,7 +410,7 @@ unit cpupara;
                 paraloc^.register:=NR_FUNCTION_RESULT64_LOW_REG;
                 paraloc^.register:=NR_FUNCTION_RESULT64_LOW_REG;
 
 
                 { high }
                 { high }
-                paraloc:=p.funcret_paraloc[side].add_location;
+                paraloc:=p.funcretloc[side].add_location;
                 paraloc^.loc:=LOC_REGISTER;
                 paraloc^.loc:=LOC_REGISTER;
                 paraloc^.size:=OS_32;
                 paraloc^.size:=OS_32;
                 paraloc^.register:=NR_FUNCTION_RESULT64_HIGH_REG;
                 paraloc^.register:=NR_FUNCTION_RESULT64_HIGH_REG;
@@ -472,7 +472,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.25  2004-11-06 17:44:47  florian
+  Revision 1.26  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.25  2004/11/06 17:44:47  florian
     + additional extdebug check for wrong add_reg_instructions added
     + additional extdebug check for wrong add_reg_instructions added
     * too long manglednames are cut off at 200 chars using a crc
     * too long manglednames are cut off at 200 chars using a crc
 
 

+ 10 - 5
compiler/i386/cgcpu.pas

@@ -211,16 +211,16 @@ unit cgcpu;
         { return from proc }
         { return from proc }
         if (po_interrupt in current_procinfo.procdef.procoptions) then
         if (po_interrupt in current_procinfo.procdef.procoptions) then
           begin
           begin
-            if (current_procinfo.procdef.funcret_paraloc[calleeside].loc<>LOC_VOID) and
-               (current_procinfo.procdef.funcret_paraloc[calleeside].loc=LOC_REGISTER) then
+            if (current_procinfo.procdef.funcretloc[calleeside].loc<>LOC_VOID) and
+               (current_procinfo.procdef.funcretloc[calleeside].loc=LOC_REGISTER) then
               list.concat(Taicpu.Op_const_reg(A_ADD,S_L,4,NR_ESP))
               list.concat(Taicpu.Op_const_reg(A_ADD,S_L,4,NR_ESP))
             else
             else
               list.concat(Taicpu.Op_reg(A_POP,S_L,NR_EAX));
               list.concat(Taicpu.Op_reg(A_POP,S_L,NR_EAX));
             list.concat(Taicpu.Op_reg(A_POP,S_L,NR_EBX));
             list.concat(Taicpu.Op_reg(A_POP,S_L,NR_EBX));
             list.concat(Taicpu.Op_reg(A_POP,S_L,NR_ECX));
             list.concat(Taicpu.Op_reg(A_POP,S_L,NR_ECX));
 
 
-            if (current_procinfo.procdef.funcret_paraloc[calleeside].loc=LOC_REGISTER) and
-               (current_procinfo.procdef.funcret_paraloc[calleeside].size in [OS_64,OS_S64]) then
+            if (current_procinfo.procdef.funcretloc[calleeside].loc=LOC_REGISTER) and
+               (current_procinfo.procdef.funcretloc[calleeside].size in [OS_64,OS_S64]) then
               list.concat(Taicpu.Op_const_reg(A_ADD,S_L,4,NR_ESP))
               list.concat(Taicpu.Op_const_reg(A_ADD,S_L,4,NR_ESP))
             else
             else
               list.concat(Taicpu.Op_reg(A_POP,S_L,NR_EDX));
               list.concat(Taicpu.Op_reg(A_POP,S_L,NR_EDX));
@@ -520,7 +520,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.61  2004-11-21 17:17:04  florian
+  Revision 1.62  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.61  2004/11/21 17:17:04  florian
     * changed funcret location back to tlocation
     * changed funcret location back to tlocation
 
 
   Revision 1.60  2004/10/31 21:45:03  peter
   Revision 1.60  2004/10/31 21:45:03  peter

+ 26 - 21
compiler/i386/cpupara.pas

@@ -50,7 +50,7 @@ unit cpupara;
           function create_varargs_paraloc_info(p : tabstractprocdef; varargspara:tvarargsparalist):longint;override;
           function create_varargs_paraloc_info(p : tabstractprocdef; varargspara:tvarargsparalist):longint;override;
           procedure createtempparaloc(list: taasmoutput;calloption : tproccalloption;parasym : tparavarsym;var cgpara:TCGPara);override;
           procedure createtempparaloc(list: taasmoutput;calloption : tproccalloption;parasym : tparavarsym;var cgpara:TCGPara);override;
        private
        private
-          procedure create_funcret_paraloc_info(p : tabstractprocdef; side: tcallercallee);
+          procedure create_funcretloc_info(p : tabstractprocdef; side: tcallercallee);
           procedure create_stdcall_paraloc_info(p : tabstractprocdef; side: tcallercallee;paras:tlist;var parasize:longint);
           procedure create_stdcall_paraloc_info(p : tabstractprocdef; side: tcallercallee;paras:tlist;var parasize:longint);
           procedure create_register_paraloc_info(p : tabstractprocdef; side: tcallercallee;paras:tlist;var parareg,parasize:longint);
           procedure create_register_paraloc_info(p : tabstractprocdef; side: tcallercallee;paras:tlist;var parareg,parasize:longint);
        end;
        end;
@@ -223,7 +223,7 @@ unit cpupara;
       end;
       end;
 
 
 
 
-    procedure ti386paramanager.create_funcret_paraloc_info(p : tabstractprocdef; side: tcallercallee);
+    procedure ti386paramanager.create_funcretloc_info(p : tabstractprocdef; side: tcallercallee);
       var
       var
         retcgsize  : tcgsize;
         retcgsize  : tcgsize;
       begin
       begin
@@ -233,19 +233,19 @@ unit cpupara;
         else
         else
           retcgsize:=def_cgsize(p.rettype.def);
           retcgsize:=def_cgsize(p.rettype.def);
 
 
-        location_reset(p.funcret_paraloc[side],LOC_INVALID,OS_NO);
+        location_reset(p.funcretloc[side],LOC_INVALID,OS_NO);
         { void has no location }
         { void has no location }
         if is_void(p.rettype.def) then
         if is_void(p.rettype.def) then
           begin
           begin
-            location_reset(p.funcret_paraloc[side],LOC_VOID,OS_NO);
+            location_reset(p.funcretloc[side],LOC_VOID,OS_NO);
             exit;
             exit;
           end;
           end;
         { Return in FPU register? }
         { Return in FPU register? }
         if p.rettype.def.deftype=floatdef then
         if p.rettype.def.deftype=floatdef then
           begin
           begin
-            p.funcret_paraloc[side].loc:=LOC_FPUREGISTER;
-            p.funcret_paraloc[side].register:=NR_FPU_RESULT_REG;
-            p.funcret_paraloc[side].size:=retcgsize;
+            p.funcretloc[side].loc:=LOC_FPUREGISTER;
+            p.funcretloc[side].register:=NR_FPU_RESULT_REG;
+            p.funcretloc[side].size:=retcgsize;
           end
           end
         else
         else
          { Return in register? }
          { Return in register? }
@@ -254,32 +254,32 @@ unit cpupara;
             if retcgsize in [OS_64,OS_S64] then
             if retcgsize in [OS_64,OS_S64] then
              begin
              begin
                { low 32bits }
                { low 32bits }
-               p.funcret_paraloc[side].loc:=LOC_REGISTER;
-               p.funcret_paraloc[side].size:=OS_64;
+               p.funcretloc[side].loc:=LOC_REGISTER;
+               p.funcretloc[side].size:=OS_64;
                if side=callerside then
                if side=callerside then
-                 p.funcret_paraloc[side].register64.reglo:=NR_FUNCTION_RESULT64_LOW_REG
+                 p.funcretloc[side].register64.reglo:=NR_FUNCTION_RESULT64_LOW_REG
                else
                else
-                 p.funcret_paraloc[side].register64.reglo:=NR_FUNCTION_RETURN64_LOW_REG;
+                 p.funcretloc[side].register64.reglo:=NR_FUNCTION_RETURN64_LOW_REG;
                { high 32bits }
                { high 32bits }
                if side=callerside then
                if side=callerside then
-                 p.funcret_paraloc[side].register64.reghi:=NR_FUNCTION_RESULT64_HIGH_REG
+                 p.funcretloc[side].register64.reghi:=NR_FUNCTION_RESULT64_HIGH_REG
                else
                else
-                 p.funcret_paraloc[side].register64.reghi:=NR_FUNCTION_RETURN64_HIGH_REG;
+                 p.funcretloc[side].register64.reghi:=NR_FUNCTION_RETURN64_HIGH_REG;
              end
              end
             else
             else
              begin
              begin
-               p.funcret_paraloc[side].loc:=LOC_REGISTER;
-               p.funcret_paraloc[side].size:=retcgsize;
+               p.funcretloc[side].loc:=LOC_REGISTER;
+               p.funcretloc[side].size:=retcgsize;
                if side=callerside then
                if side=callerside then
-                 p.funcret_paraloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RESULT_REG,cgsize2subreg(retcgsize))
+                 p.funcretloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RESULT_REG,cgsize2subreg(retcgsize))
                else
                else
-                 p.funcret_paraloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RETURN_REG,cgsize2subreg(retcgsize));
+                 p.funcretloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RETURN_REG,cgsize2subreg(retcgsize));
              end;
              end;
           end
           end
         else
         else
           begin
           begin
-            p.funcret_paraloc[side].loc:=LOC_REFERENCE;
-            p.funcret_paraloc[side].size:=retcgsize;
+            p.funcretloc[side].loc:=LOC_REFERENCE;
+            p.funcretloc[side].size:=retcgsize;
           end;
           end;
       end;
       end;
 
 
@@ -476,7 +476,7 @@ unit cpupara;
           else
           else
             create_stdcall_paraloc_info(p,side,p.paras,parasize);
             create_stdcall_paraloc_info(p,side,p.paras,parasize);
         end;
         end;
-        create_funcret_paraloc_info(p,side);
+        create_funcretloc_info(p,side);
         result:=parasize;
         result:=parasize;
       end;
       end;
 
 
@@ -514,7 +514,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.58  2004-11-21 17:17:04  florian
+  Revision 1.59  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.58  2004/11/21 17:17:04  florian
     * changed funcret location back to tlocation
     * changed funcret location back to tlocation
 
 
   Revision 1.57  2004/11/15 23:35:31  peter
   Revision 1.57  2004/11/15 23:35:31  peter

+ 16 - 16
compiler/nbas.pas

@@ -125,8 +125,7 @@ interface
           { where the node that receives the temp becomes responsible for       }
           { where the node that receives the temp becomes responsible for       }
           { freeing it. In this last case, you must use only one reference      }
           { freeing it. In this last case, you must use only one reference      }
           { to it and *not* generate a ttempdeletenode                          }
           { to it and *not* generate a ttempdeletenode                          }
-          constructor create(const _restype: ttype; _size: longint; _temptype: ttemptype); virtual;
-          constructor create_reg(const _restype: ttype; _size: longint; _temptype: ttemptype); virtual;
+          constructor create(const _restype: ttype; _size: longint; _temptype: ttemptype;allowreg:boolean); virtual;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure buildderefimpl;override;
           procedure buildderefimpl;override;
@@ -673,10 +672,17 @@ implementation
                           TEMPCREATENODE
                           TEMPCREATENODE
 *****************************************************************************}
 *****************************************************************************}
 
 
-    constructor ttempcreatenode.create_reg(const _restype: ttype; _size: longint; _temptype: ttemptype);
+    constructor ttempcreatenode.create(const _restype: ttype; _size: longint; _temptype: ttemptype;allowreg:boolean);
       begin
       begin
-        create(_restype,_size,_temptype);
+        inherited create(tempcreaten);
+        size := _size;
+        new(tempinfo);
+        fillchar(tempinfo^,sizeof(tempinfo^),0);
+        tempinfo^.restype := _restype;
+        tempinfo^.temptype := _temptype;
+        tempinfo^.owner:=self;
         tempinfo^.may_be_in_reg:=
         tempinfo^.may_be_in_reg:=
+          allowreg and
           { temp must fit a single register }
           { temp must fit a single register }
           ((_restype.def.deftype = floatdef) or
           ((_restype.def.deftype = floatdef) or
            (_size<=TCGSize2Size[OS_INT])) and
            (_size<=TCGSize2Size[OS_INT])) and
@@ -688,17 +694,6 @@ implementation
            (not tpointerdef(_restype.def).pointertype.def.needs_inittable));
            (not tpointerdef(_restype.def).pointertype.def.needs_inittable));
       end;
       end;
 
 
-    constructor ttempcreatenode.create(const _restype: ttype; _size: longint; _temptype: ttemptype);
-      begin
-        inherited create(tempcreaten);
-        size := _size;
-        new(tempinfo);
-        fillchar(tempinfo^,sizeof(tempinfo^),0);
-        tempinfo^.restype := _restype;
-        tempinfo^.temptype := _temptype;
-        tempinfo^.owner:=self;
-      end;
-
     function ttempcreatenode.getcopy: tnode;
     function ttempcreatenode.getcopy: tnode;
       var
       var
         n: ttempcreatenode;
         n: ttempcreatenode;
@@ -1028,7 +1023,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.89  2004-10-31 21:45:03  peter
+  Revision 1.90  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.89  2004/10/31 21:45:03  peter
     * generic tlocation
     * generic tlocation
     * move tlocation to cgutils
     * move tlocation to cgutils
 
 

+ 11 - 20
compiler/ncal.pas

@@ -255,7 +255,7 @@ type
                 newdonestatement:=laststatement(aktcallnode.methodpointerdone);
                 newdonestatement:=laststatement(aktcallnode.methodpointerdone);
               end;
               end;
             { temp create }
             { temp create }
-            ptemp:=ctempcreatenode.create_reg(p.resulttype,p.resulttype.def.size,tt_persistent);
+            ptemp:=ctempcreatenode.create(p.resulttype,p.resulttype.def.size,tt_persistent,true);
             addstatement(newinitstatement,ptemp);
             addstatement(newinitstatement,ptemp);
             addstatement(newinitstatement,cassignmentnode.create(
             addstatement(newinitstatement,cassignmentnode.create(
                 ctemprefnode.create(ptemp),
                 ctemprefnode.create(ptemp),
@@ -1311,7 +1311,7 @@ type
                     hiddentree:=internalstatements(newstatement);
                     hiddentree:=internalstatements(newstatement);
                     { need to use resulttype instead of procdefinition.rettype,
                     { need to use resulttype instead of procdefinition.rettype,
                       because they can be different }
                       because they can be different }
-                    temp:=ctempcreatenode.create(resulttype,resulttype.def.size,tt_persistent);
+                    temp:=ctempcreatenode.create(resulttype,resulttype.def.size,tt_persistent,false);
                     addstatement(newstatement,temp);
                     addstatement(newstatement,temp);
                     addstatement(newstatement,ctempdeletenode.create_normal_temp(temp));
                     addstatement(newstatement,ctempdeletenode.create_normal_temp(temp));
                     addstatement(newstatement,ctemprefnode.create(temp));
                     addstatement(newstatement,ctemprefnode.create(temp));
@@ -1945,12 +1945,7 @@ type
         else
         else
 {$endif ndef VER1_0}
 {$endif ndef VER1_0}
           begin
           begin
-            if (cs_regvars in aktglobalswitches) and
-               (tabstractvarsym(p).varregable<>vr_none) and
-               (not tabstractvarsym(p).vartype.def.needs_inittable) then
-              tempnode := ctempcreatenode.create_reg(tabstractvarsym(p).vartype,tabstractvarsym(p).vartype.def.size,tt_persistent)
-            else
-              tempnode := ctempcreatenode.create(tabstractvarsym(p).vartype,tabstractvarsym(p).vartype.def.size,tt_persistent);
+            tempnode := ctempcreatenode.create(tabstractvarsym(p).vartype,tabstractvarsym(p).vartype.def.size,tt_persistent,true);
             addstatement(tempinfo^.createstatement,tempnode);
             addstatement(tempinfo^.createstatement,tempnode);
             if assigned(tlocalvarsym(p).defaultconstsym) then
             if assigned(tlocalvarsym(p).defaultconstsym) then
               begin
               begin
@@ -1999,12 +1994,7 @@ type
                     { the problem is that we can't take the address of a function result :( }
                     { the problem is that we can't take the address of a function result :( }
                      (node_complexity(para.left) >= NODE_COMPLEXITY_INF))) then
                      (node_complexity(para.left) >= NODE_COMPLEXITY_INF))) then
                   begin
                   begin
-                    if (cs_regvars in aktglobalswitches) and
-                       (tparavarsym(para.parasym).varregable<>vr_none) and
-                       (not tparavarsym(para.parasym).vartype.def.needs_inittable) then
-                      tempnode := ctempcreatenode.create_reg(para.left.resulttype,para.left.resulttype.def.size,tt_persistent)
-                    else
-                      tempnode := ctempcreatenode.create(para.left.resulttype,para.left.resulttype.def.size,tt_persistent);
+                    tempnode := ctempcreatenode.create(para.left.resulttype,para.left.resulttype.def.size,tt_persistent,true);
                     addstatement(createstatement,tempnode);
                     addstatement(createstatement,tempnode);
                     { assign the value of the parameter to the temp, except in case of the function result }
                     { assign the value of the parameter to the temp, except in case of the function result }
                     { (in that case, para.left is a block containing the creation of a new temp, while we  }
                     { (in that case, para.left is a block containing the creation of a new temp, while we  }
@@ -2027,11 +2017,7 @@ type
                   end
                   end
                 else if node_complexity(para.left) > 1 then
                 else if node_complexity(para.left) > 1 then
                   begin
                   begin
-                    if (cs_regvars in aktglobalswitches) and
-                       not tparavarsym(para.parasym).vartype.def.needs_inittable then
-                      tempnode := ctempcreatenode.create_reg(voidpointertype,voidpointertype.def.size,tt_persistent)
-                    else
-                      tempnode := ctempcreatenode.create(voidpointertype,voidpointertype.def.size,tt_persistent);
+                    tempnode := ctempcreatenode.create(voidpointertype,voidpointertype.def.size,tt_persistent,true);
                     addstatement(createstatement,tempnode);
                     addstatement(createstatement,tempnode);
                     addstatement(createstatement,cassignmentnode.create(ctemprefnode.create(tempnode),
                     addstatement(createstatement,cassignmentnode.create(ctemprefnode.create(tempnode),
                       caddrnode.create(para.left)));
                       caddrnode.create(para.left)));
@@ -2413,7 +2399,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.260  2004-11-15 23:35:31  peter
+  Revision 1.261  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.260  2004/11/15 23:35:31  peter
     * tparaitem removed, use tparavarsym instead
     * tparaitem removed, use tparavarsym instead
     * parameter order is now calculated from paranr value in tparavarsym
     * parameter order is now calculated from paranr value in tparavarsym
 
 

+ 32 - 27
compiler/ncgcal.pas

@@ -495,7 +495,7 @@ implementation
         tempnode  : tnode;
         tempnode  : tnode;
         resultparaloc : pcgparalocation;
         resultparaloc : pcgparalocation;
       begin
       begin
-        cgsize:=procdefinition.funcret_paraloc[callerside].size;
+        cgsize:=procdefinition.funcretloc[callerside].size;
 
 
         { structured results are easy to handle....
         { structured results are easy to handle....
           needed also when result_no_used !! }
           needed also when result_no_used !! }
@@ -510,18 +510,18 @@ implementation
           { ansi/widestrings must be registered, so we can dispose them }
           { ansi/widestrings must be registered, so we can dispose them }
           if resulttype.def.needs_inittable then
           if resulttype.def.needs_inittable then
             begin
             begin
-              if procdefinition.funcret_paraloc[callerside].loc<>LOC_REGISTER then
+              if procdefinition.funcretloc[callerside].loc<>LOC_REGISTER then
                 internalerror(200409261);
                 internalerror(200409261);
 
 
               { the FUNCTION_RESULT_REG is already allocated }
               { the FUNCTION_RESULT_REG is already allocated }
-              if getsupreg(procdefinition.funcret_paraloc[callerside].register)<first_int_imreg then
-                cg.ungetcpuregister(exprasmlist,procdefinition.funcret_paraloc[callerside].register);
+              if getsupreg(procdefinition.funcretloc[callerside].register)<first_int_imreg then
+                cg.ungetcpuregister(exprasmlist,procdefinition.funcretloc[callerside].register);
               if not assigned(funcretnode) then
               if not assigned(funcretnode) then
                 begin
                 begin
                   { reg_ref could generate two instrcutions and allocate a register so we've to
                   { reg_ref could generate two instrcutions and allocate a register so we've to
                     save the result first before releasing it }
                     save the result first before releasing it }
                   hregister:=cg.getaddressregister(exprasmlist);
                   hregister:=cg.getaddressregister(exprasmlist);
-                  cg.a_load_reg_reg(exprasmlist,OS_ADDR,OS_ADDR,procdefinition.funcret_paraloc[callerside].register,hregister);
+                  cg.a_load_reg_reg(exprasmlist,OS_ADDR,OS_ADDR,procdefinition.funcretloc[callerside].register,hregister);
 
 
                   location_reset(location,LOC_REFERENCE,OS_ADDR);
                   location_reset(location,LOC_REFERENCE,OS_ADDR);
                   location.reference:=refcountedtemp;
                   location.reference:=refcountedtemp;
@@ -530,7 +530,7 @@ implementation
               else
               else
                 begin
                 begin
                   hregister := cg.getaddressregister(exprasmlist);
                   hregister := cg.getaddressregister(exprasmlist);
-                  cg.a_load_reg_reg(exprasmlist,OS_ADDR,OS_ADDR,procdefinition.funcret_paraloc[callerside].register,hregister);
+                  cg.a_load_reg_reg(exprasmlist,OS_ADDR,OS_ADDR,procdefinition.funcretloc[callerside].register,hregister);
                   { in case of a regular funcretnode with ret_in_param, the }
                   { in case of a regular funcretnode with ret_in_param, the }
                   { original funcretnode isn't touched -> make sure it's    }
                   { original funcretnode isn't touched -> make sure it's    }
                   { the same here (not sure if it's necessary)              }
                   { the same here (not sure if it's necessary)              }
@@ -548,12 +548,12 @@ implementation
             { we have only to handle the result if it is used }
             { we have only to handle the result if it is used }
             if (cnf_return_value_used in callnodeflags) then
             if (cnf_return_value_used in callnodeflags) then
               begin
               begin
-                location.loc:=procdefinition.funcret_paraloc[callerside].loc;
-                case procdefinition.funcret_paraloc[callerside].loc of
+                location.loc:=procdefinition.funcretloc[callerside].loc;
+                case procdefinition.funcretloc[callerside].loc of
                    LOC_FPUREGISTER:
                    LOC_FPUREGISTER:
                      begin
                      begin
                        location_reset(location,LOC_FPUREGISTER,cgsize);
                        location_reset(location,LOC_FPUREGISTER,cgsize);
-                       location.register:=procdefinition.funcret_paraloc[callerside].register;
+                       location.register:=procdefinition.funcretloc[callerside].register;
 {$ifdef x86}
 {$ifdef x86}
                        tcgx86(cg).inc_fpu_stack;
                        tcgx86(cg).inc_fpu_stack;
 {$else x86}
 {$else x86}
@@ -573,7 +573,7 @@ implementation
 {$ifndef cpu64bit}
 {$ifndef cpu64bit}
                           if cgsize in [OS_64,OS_S64] then
                           if cgsize in [OS_64,OS_S64] then
                            begin
                            begin
-                             retloc:=procdefinition.funcret_paraloc[callerside];
+                             retloc:=procdefinition.funcretloc[callerside];
                              if retloc.loc<>LOC_REGISTER then
                              if retloc.loc<>LOC_REGISTER then
                                internalerror(200409141);
                                internalerror(200409141);
                              { the function result registers are already allocated }
                              { the function result registers are already allocated }
@@ -593,10 +593,10 @@ implementation
                                getregister was done for the full register
                                getregister was done for the full register
                                def_cgsize(resulttype.def) is used here because
                                def_cgsize(resulttype.def) is used here because
                                it could be a constructor call }
                                it could be a constructor call }
-                             if getsupreg(procdefinition.funcret_paraloc[callerside].register)<first_int_imreg then
-                               cg.ungetcpuregister(exprasmlist,procdefinition.funcret_paraloc[callerside].register);
+                             if getsupreg(procdefinition.funcretloc[callerside].register)<first_int_imreg then
+                               cg.ungetcpuregister(exprasmlist,procdefinition.funcretloc[callerside].register);
                              location.register:=cg.getintregister(exprasmlist,def_cgsize(resulttype.def));
                              location.register:=cg.getintregister(exprasmlist,def_cgsize(resulttype.def));
-                             cg.a_load_reg_reg(exprasmlist,cgsize,def_cgsize(resulttype.def),procdefinition.funcret_paraloc[callerside].register,location.register);
+                             cg.a_load_reg_reg(exprasmlist,cgsize,def_cgsize(resulttype.def),procdefinition.funcretloc[callerside].register,location.register);
                            end;
                            end;
                         end
                         end
                        else
                        else
@@ -609,10 +609,10 @@ implementation
                    LOC_MMREGISTER:
                    LOC_MMREGISTER:
                      begin
                      begin
                        location_reset(location,LOC_MMREGISTER,cgsize);
                        location_reset(location,LOC_MMREGISTER,cgsize);
-                       if getsupreg(procdefinition.funcret_paraloc[callerside].register)<first_mm_imreg then
-                         cg.ungetcpuregister(exprasmlist,procdefinition.funcret_paraloc[callerside].register);
+                       if getsupreg(procdefinition.funcretloc[callerside].register)<first_mm_imreg then
+                         cg.ungetcpuregister(exprasmlist,procdefinition.funcretloc[callerside].register);
                        location.register:=cg.getmmregister(exprasmlist,cgsize);
                        location.register:=cg.getmmregister(exprasmlist,cgsize);
-                       cg.a_loadmm_reg_reg(exprasmlist,cgsize,cgsize,procdefinition.funcret_paraloc[callerside].register,location.register,mms_movescalar);
+                       cg.a_loadmm_reg_reg(exprasmlist,cgsize,cgsize,procdefinition.funcretloc[callerside].register,location.register,mms_movescalar);
                      end;
                      end;
 
 
                    else
                    else
@@ -623,11 +623,11 @@ implementation
               begin
               begin
 {$ifdef x86}
 {$ifdef x86}
                 { release FPU stack }
                 { release FPU stack }
-                if procdefinition.funcret_paraloc[callerside].loc=LOC_FPUREGISTER then
+                if procdefinition.funcretloc[callerside].loc=LOC_FPUREGISTER then
                   emit_reg(A_FSTP,S_NO,NR_FPU_RESULT_REG);
                   emit_reg(A_FSTP,S_NO,NR_FPU_RESULT_REG);
 {$endif x86}
 {$endif x86}
                 if cgsize<>OS_NO then
                 if cgsize<>OS_NO then
-                  location_free(exprasmlist,procdefinition.funcret_paraloc[callerside]);
+                  location_free(exprasmlist,procdefinition.funcretloc[callerside]);
                 location_reset(location,LOC_VOID,OS_NO);
                 location_reset(location,LOC_VOID,OS_NO);
               end;
               end;
            end;
            end;
@@ -821,16 +821,16 @@ implementation
         { Include Function result registers }
         { Include Function result registers }
         if (not is_void(resulttype.def)) then
         if (not is_void(resulttype.def)) then
           begin
           begin
-            case procdefinition.funcret_paraloc[callerside].loc of
+            case procdefinition.funcretloc[callerside].loc of
               LOC_REGISTER,
               LOC_REGISTER,
               LOC_CREGISTER:
               LOC_CREGISTER:
-                include(regs_to_save_int,getsupreg(procdefinition.funcret_paraloc[callerside].register));
+                include(regs_to_save_int,getsupreg(procdefinition.funcretloc[callerside].register));
               LOC_FPUREGISTER,
               LOC_FPUREGISTER,
               LOC_CFPUREGISTER:
               LOC_CFPUREGISTER:
-                include(regs_to_save_fpu,getsupreg(procdefinition.funcret_paraloc[callerside].register));
+                include(regs_to_save_fpu,getsupreg(procdefinition.funcretloc[callerside].register));
               LOC_MMREGISTER,
               LOC_MMREGISTER,
               LOC_CMMREGISTER:
               LOC_CMMREGISTER:
-                include(regs_to_save_mm,getsupreg(procdefinition.funcret_paraloc[callerside].register));
+                include(regs_to_save_mm,getsupreg(procdefinition.funcretloc[callerside].register));
               LOC_REFERENCE,
               LOC_REFERENCE,
               LOC_VOID:
               LOC_VOID:
                 ;
                 ;
@@ -984,16 +984,16 @@ implementation
            function result }
            function result }
          if (not is_void(resulttype.def)) then
          if (not is_void(resulttype.def)) then
            begin
            begin
-             case procdefinition.funcret_paraloc[callerside].loc of
+             case procdefinition.funcretloc[callerside].loc of
                LOC_REGISTER,
                LOC_REGISTER,
                LOC_CREGISTER:
                LOC_CREGISTER:
-                 exclude(regs_to_save_int,getsupreg(procdefinition.funcret_paraloc[callerside].register));
+                 exclude(regs_to_save_int,getsupreg(procdefinition.funcretloc[callerside].register));
                LOC_FPUREGISTER,
                LOC_FPUREGISTER,
                LOC_CFPUREGISTER:
                LOC_CFPUREGISTER:
-                 exclude(regs_to_save_fpu,getsupreg(procdefinition.funcret_paraloc[callerside].register));
+                 exclude(regs_to_save_fpu,getsupreg(procdefinition.funcretloc[callerside].register));
                LOC_MMREGISTER,
                LOC_MMREGISTER,
                LOC_CMMREGISTER:
                LOC_CMMREGISTER:
-                 exclude(regs_to_save_mm,getsupreg(procdefinition.funcret_paraloc[callerside].register));
+                 exclude(regs_to_save_mm,getsupreg(procdefinition.funcretloc[callerside].register));
                LOC_REFERENCE,
                LOC_REFERENCE,
                LOC_VOID:
                LOC_VOID:
                  ;
                  ;
@@ -1248,7 +1248,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.186  2004-11-21 17:17:03  florian
+  Revision 1.187  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.186  2004/11/21 17:17:03  florian
     * changed funcret location back to tlocation
     * changed funcret location back to tlocation
 
 
   Revision 1.185  2004/11/15 23:35:31  peter
   Revision 1.185  2004/11/15 23:35:31  peter

+ 23 - 18
compiler/ncgutil.pas

@@ -1062,7 +1062,7 @@ implementation
         funcretloc : tlocation;
         funcretloc : tlocation;
       begin
       begin
         { Is the loading needed? }
         { Is the loading needed? }
-        if (current_procinfo.procdef.funcret_paraloc[calleeside].loc=LOC_VOID) or
+        if (current_procinfo.procdef.funcretloc[calleeside].loc=LOC_VOID) or
            (
            (
             (po_assembler in current_procinfo.procdef.procoptions) and
             (po_assembler in current_procinfo.procdef.procoptions) and
             (not(assigned(current_procinfo.procdef.funcretsym)) or
             (not(assigned(current_procinfo.procdef.funcretsym)) or
@@ -1070,7 +1070,7 @@ implementation
            ) then
            ) then
            exit;
            exit;
 
 
-        funcretloc:=current_procinfo.procdef.funcret_paraloc[calleeside];
+        funcretloc:=current_procinfo.procdef.funcretloc[calleeside];
 
 
         { constructors return self }
         { constructors return self }
         if (current_procinfo.procdef.proctypeoption=potype_constructor) then
         if (current_procinfo.procdef.proctypeoption=potype_constructor) then
@@ -1120,9 +1120,9 @@ implementation
               LOC_REGISTER:
               LOC_REGISTER:
                 begin
                 begin
 {$ifndef cpu64bit}
 {$ifndef cpu64bit}
-                  if current_procinfo.procdef.funcret_paraloc[calleeside].size in [OS_64,OS_S64] then
+                  if current_procinfo.procdef.funcretloc[calleeside].size in [OS_64,OS_S64] then
                     begin
                     begin
-                      resloc:=current_procinfo.procdef.funcret_paraloc[calleeside];
+                      resloc:=current_procinfo.procdef.funcretloc[calleeside];
                       if resloc.loc<>LOC_REGISTER then
                       if resloc.loc<>LOC_REGISTER then
                         internalerror(200409141);
                         internalerror(200409141);
                       { Load low and high register separate to generate better register
                       { Load low and high register separate to generate better register
@@ -1769,7 +1769,7 @@ implementation
         cg.g_proc_exit(list,parasize,(po_nostackframe in current_procinfo.procdef.procoptions));
         cg.g_proc_exit(list,parasize,(po_nostackframe in current_procinfo.procdef.procoptions));
 
 
         { release return registers, needed for optimizer }
         { release return registers, needed for optimizer }
-        location_free(list,current_procinfo.procdef.funcret_paraloc[calleeside]);
+        location_free(list,current_procinfo.procdef.funcretloc[calleeside]);
 
 
         { end of frame marker for call frame info }
         { end of frame marker for call frame info }
         dwarfcfi.end_frame(list);
         dwarfcfi.end_frame(list);
@@ -2134,12 +2134,12 @@ implementation
             localloc.loc:=LOC_REFERENCE;
             localloc.loc:=LOC_REFERENCE;
             localloc.size:=int_cgsize(paramanager.push_size(varspez,vartype.def,pocall_inline));
             localloc.size:=int_cgsize(paramanager.push_size(varspez,vartype.def,pocall_inline));
             tg.GetLocal(list,tcgsize2size[localloc.size],vartype.def,localloc.reference);
             tg.GetLocal(list,tcgsize2size[localloc.size],vartype.def,localloc.reference);
-            callerparaloc:=pd.funcret_paraloc[callerside];
-            case pd.funcret_paraloc[calleeside].loc of
+            callerparaloc:=pd.funcretloc[callerside];
+            case pd.funcretloc[calleeside].loc of
               LOC_FPUREGISTER:
               LOC_FPUREGISTER:
                 begin
                 begin
-                  pd.funcret_paraloc[calleeside].register:=cg.getfpuregister(list,pd.funcret_paraloc[calleeside].size);
-                  pd.funcret_paraloc[callerside].register:=pd.funcret_paraloc[calleeside].register;
+                  pd.funcretloc[calleeside].register:=cg.getfpuregister(list,pd.funcretloc[calleeside].size);
+                  pd.funcretloc[callerside].register:=pd.funcretloc[calleeside].register;
                 end;
                 end;
               LOC_REGISTER:
               LOC_REGISTER:
                 begin
                 begin
@@ -2150,21 +2150,21 @@ implementation
                   else
                   else
 {$endif cpu64bit}
 {$endif cpu64bit}
                     begin
                     begin
-                      pd.funcret_paraloc[calleeside].register:=cg.getintregister(list,pd.funcret_paraloc[calleeside].size);
-                      pd.funcret_paraloc[callerside].register:=pd.funcret_paraloc[calleeside].register;
+                      pd.funcretloc[calleeside].register:=cg.getintregister(list,pd.funcretloc[calleeside].size);
+                      pd.funcretloc[callerside].register:=pd.funcretloc[calleeside].register;
                     end;
                     end;
                 end;
                 end;
               LOC_MMREGISTER:
               LOC_MMREGISTER:
                 begin
                 begin
-                  pd.funcret_paraloc[calleeside].register:=cg.getmmregister(list,pd.funcret_paraloc[calleeside].size);
-                  pd.funcret_paraloc[callerside].register:=pd.funcret_paraloc[calleeside].register;
+                  pd.funcretloc[calleeside].register:=cg.getmmregister(list,pd.funcretloc[calleeside].size);
+                  pd.funcretloc[callerside].register:=pd.funcretloc[calleeside].register;
                 end;
                 end;
               LOC_REFERENCE:
               LOC_REFERENCE:
                 begin
                 begin
-                  pd.funcret_paraloc[calleeside].reference.offset := localloc.reference.offset;
-                  pd.funcret_paraloc[calleeside].reference.index := localloc.reference.base;
-                  pd.funcret_paraloc[callerside].reference.offset := localloc.reference.offset;
-                  pd.funcret_paraloc[callerside].reference.index := localloc.reference.base;
+                  pd.funcretloc[calleeside].reference.offset := localloc.reference.offset;
+                  pd.funcretloc[calleeside].reference.index := localloc.reference.base;
+                  pd.funcretloc[callerside].reference.offset := localloc.reference.offset;
+                  pd.funcretloc[callerside].reference.index := localloc.reference.base;
                 end;
                 end;
               LOC_VOID:
               LOC_VOID:
                 ;
                 ;
@@ -2259,7 +2259,12 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.243  2004-11-21 17:17:03  florian
+  Revision 1.244  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.243  2004/11/21 17:17:03  florian
     * changed funcret location back to tlocation
     * changed funcret location back to tlocation
 
 
   Revision 1.242  2004/11/19 08:17:01  michael
   Revision 1.242  2004/11/19 08:17:01  michael

+ 12 - 7
compiler/ninl.pas

@@ -371,7 +371,7 @@ implementation
           begin
           begin
             { since the input/output variables are threadvars loading them into
             { since the input/output variables are threadvars loading them into
               a temp once is faster. Create a temp which will hold a pointer to the file }
               a temp once is faster. Create a temp which will hold a pointer to the file }
-            filetemp := ctempcreatenode.create_reg(voidpointertype,voidpointertype.def.size,tt_persistent);
+            filetemp := ctempcreatenode.create(voidpointertype,voidpointertype.def.size,tt_persistent,true);
             addstatement(newstatement,filetemp);
             addstatement(newstatement,filetemp);
 
 
             { make sure the resulttype of the temp (and as such of the }
             { make sure the resulttype of the temp (and as such of the }
@@ -410,7 +410,7 @@ implementation
             if (filepara.left.nodetype <> loadn) then
             if (filepara.left.nodetype <> loadn) then
               begin
               begin
                 { create a temp which will hold a pointer to the file }
                 { create a temp which will hold a pointer to the file }
-                filetemp := ctempcreatenode.create_reg(voidpointertype,voidpointertype.def.size,tt_persistent);
+                filetemp := ctempcreatenode.create(voidpointertype,voidpointertype.def.size,tt_persistent,true);
 
 
                 { add it to the statements }
                 { add it to the statements }
                 addstatement(newstatement,filetemp);
                 addstatement(newstatement,filetemp);
@@ -522,7 +522,7 @@ implementation
                   begin
                   begin
                     { create temp for result }
                     { create temp for result }
                     temp := ctempcreatenode.create(para.left.resulttype,
                     temp := ctempcreatenode.create(para.left.resulttype,
-                      para.left.resulttype.def.size,tt_persistent);
+                      para.left.resulttype.def.size,tt_persistent,true);
                     addstatement(newstatement,temp);
                     addstatement(newstatement,temp);
                     { assign result to temp }
                     { assign result to temp }
                     addstatement(newstatement,
                     addstatement(newstatement,
@@ -771,7 +771,7 @@ implementation
                        (para.left.resulttype.def<>readfunctype.def) then
                        (para.left.resulttype.def<>readfunctype.def) then
                       begin
                       begin
                         { create the parameter list: the temp ... }
                         { create the parameter list: the temp ... }
-                        temp := ctempcreatenode.create(readfunctype,readfunctype.def.size,tt_persistent);
+                        temp := ctempcreatenode.create(readfunctype,readfunctype.def.size,tt_persistent,false);
                         addstatement(newstatement,temp);
                         addstatement(newstatement,temp);
 
 
                         { ... and the file }
                         { ... and the file }
@@ -938,7 +938,7 @@ implementation
         if not assigned(codepara) or
         if not assigned(codepara) or
            (codepara.resulttype.def.size<>sinttype.def.size) then
            (codepara.resulttype.def.size<>sinttype.def.size) then
           begin
           begin
-            tempcode := ctempcreatenode.create(sinttype,sinttype.def.size,tt_persistent);
+            tempcode := ctempcreatenode.create(sinttype,sinttype.def.size,tt_persistent,false);
             addstatement(newstatement,tempcode);
             addstatement(newstatement,tempcode);
             { set the resulttype of the temp (needed to be able to get }
             { set the resulttype of the temp (needed to be able to get }
             { the resulttype of the tempref used in the new code para) }
             { the resulttype of the tempref used in the new code para) }
@@ -2157,7 +2157,7 @@ implementation
                    { optimize the code generation)                                                }
                    { optimize the code generation)                                                }
                    if node_complexity(tcallparanode(left).left) > 1 then
                    if node_complexity(tcallparanode(left).left) > 1 then
                      begin
                      begin
-                       tempnode := ctempcreatenode.create_reg(voidpointertype,voidpointertype.def.size,tt_persistent);
+                       tempnode := ctempcreatenode.create(voidpointertype,voidpointertype.def.size,tt_persistent,true);
                        addstatement(newstatement,tempnode);
                        addstatement(newstatement,tempnode);
                        addstatement(newstatement,cassignmentnode.create(ctemprefnode.create(tempnode),
                        addstatement(newstatement,cassignmentnode.create(ctemprefnode.create(tempnode),
                          caddrnode.create(tcallparanode(left).left.getcopy)));
                          caddrnode.create(tcallparanode(left).left.getcopy)));
@@ -2463,7 +2463,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.152  2004-11-21 15:35:23  peter
+  Revision 1.153  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.152  2004/11/21 15:35:23  peter
     * float routines all use internproc and compilerproc helpers
     * float routines all use internproc and compilerproc helpers
 
 
   Revision 1.151  2004/11/09 23:10:22  peter
   Revision 1.151  2004/11/09 23:10:22  peter

+ 8 - 3
compiler/pdecsub.pas

@@ -1237,8 +1237,8 @@ begin
           else
           else
             Message(parser_e_32bitint_or_pointer_variable_expected);
             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);
+      (paramanager as tppcparamanager).create_funcretloc_info(pd,calleeside);
+      (paramanager as tppcparamanager).create_funcretloc_info(pd,callerside);
     end;
     end;
 {$endif powerpc}
 {$endif powerpc}
   tprocdef(pd).extnumber:=get_intconst;
   tprocdef(pd).extnumber:=get_intconst;
@@ -2346,7 +2346,12 @@ const
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.211  2004-11-21 16:33:19  peter
+  Revision 1.212  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.211  2004/11/21 16:33:19  peter
     * fixed message methods
     * fixed message methods
     * fixed typo with win32 dll import from implementation
     * fixed typo with win32 dll import from implementation
     * released external check
     * released external check

+ 7 - 2
compiler/pexpr.pas

@@ -319,7 +319,7 @@ implementation
              resulttypepass(p1);
              resulttypepass(p1);
              result:=internalstatements(newstatement);
              result:=internalstatements(newstatement);
              htype.setdef(tpointerdef.create(p1.resulttype));
              htype.setdef(tpointerdef.create(p1.resulttype));
-             temp:=ctempcreatenode.create(htype,sizeof(aint),tt_persistent);
+             temp:=ctempcreatenode.create(htype,sizeof(aint),tt_persistent,false);
              addstatement(newstatement,temp);
              addstatement(newstatement,temp);
              addstatement(newstatement,cassignmentnode.create(ctemprefnode.create(temp),caddrnode.create(p1)));
              addstatement(newstatement,cassignmentnode.create(ctemprefnode.create(temp),caddrnode.create(p1)));
              addstatement(newstatement,cassignmentnode.create(
              addstatement(newstatement,cassignmentnode.create(
@@ -2505,7 +2505,12 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.173  2004-11-17 22:21:35  peter
+  Revision 1.174  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.173  2004/11/17 22:21:35  peter
   mangledname setting moved to place after the complete proc declaration is read
   mangledname setting moved to place after the complete proc declaration is read
   import generation moved to place where body is also parsed (still gives problems with win32)
   import generation moved to place where body is also parsed (still gives problems with win32)
 
 

+ 10 - 5
compiler/pinline.pas

@@ -233,7 +233,7 @@ implementation
                   if is_new then
                   if is_new then
                    begin
                    begin
                      { create temp for result }
                      { create temp for result }
-                     temp := ctempcreatenode.create_reg(p.resulttype,p.resulttype.def.size,tt_persistent);
+                     temp := ctempcreatenode.create(p.resulttype,p.resulttype.def.size,tt_persistent,true);
                      addstatement(newstatement,temp);
                      addstatement(newstatement,temp);
 
 
                      { create call to fpc_getmem }
                      { create call to fpc_getmem }
@@ -314,7 +314,7 @@ implementation
             newblock:=internalstatements(newstatement);
             newblock:=internalstatements(newstatement);
 
 
             { create temp for result }
             { create temp for result }
-            temp := ctempcreatenode.create_reg(p1.resulttype,p1.resulttype.def.size,tt_persistent);
+            temp := ctempcreatenode.create(p1.resulttype,p1.resulttype.def.size,tt_persistent,true);
             addstatement(newstatement,temp);
             addstatement(newstatement,temp);
 
 
             { create call to fpc_getmem }
             { create call to fpc_getmem }
@@ -476,7 +476,7 @@ implementation
             newblock:=internalstatements(newstatement);
             newblock:=internalstatements(newstatement);
 
 
             { get temp for array of lengths }
             { get temp for array of lengths }
-            temp := ctempcreatenode.create(sinttype,dims*sinttype.def.size,tt_persistent);
+            temp := ctempcreatenode.create(sinttype,dims*sinttype.def.size,tt_persistent,false);
             addstatement(newstatement,temp);
             addstatement(newstatement,temp);
 
 
             { load array of lengths }
             { load array of lengths }
@@ -718,7 +718,7 @@ implementation
              end;
              end;
 
 
             { create typed temp for result so the temp is finalized }
             { create typed temp for result so the temp is finalized }
-            temp := ctempcreatenode.create(ppn.left.resulttype,ppn.left.resulttype.def.size,tt_persistent);
+            temp := ctempcreatenode.create(ppn.left.resulttype,ppn.left.resulttype.def.size,tt_persistent,false);
             addstatement(newstatement,temp);
             addstatement(newstatement,temp);
 
 
             { create call to fpc_dynarray_copy }
             { create call to fpc_dynarray_copy }
@@ -754,7 +754,12 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.36  2004-11-02 18:37:08  florian
+  Revision 1.37  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.36  2004/11/02 18:37:08  florian
     * dyn. array dimensions are now stored as sinttype so it's target register size dependend
     * dyn. array dimensions are now stored as sinttype so it's target register size dependend
 
 
   Revision 1.35  2004/11/02 12:55:16  peter
   Revision 1.35  2004/11/02 12:55:16  peter

+ 27 - 22
compiler/powerpc/cpupara.pas

@@ -43,7 +43,7 @@ unit cpupara;
           function create_paraloc_info(p : tabstractprocdef; side: tcallercallee):longint;override;
           function create_paraloc_info(p : tabstractprocdef; side: tcallercallee):longint;override;
           function create_varargs_paraloc_info(p : tabstractprocdef; varargspara:tvarargsparalist):longint;override;
           function create_varargs_paraloc_info(p : tabstractprocdef; varargspara:tvarargsparalist):longint;override;
 
 
-          procedure create_funcret_paraloc_info(p : tabstractprocdef; side: tcallercallee);
+          procedure create_funcretloc_info(p : tabstractprocdef; side: tcallercallee);
          private
          private
           procedure init_values(var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword);
           procedure init_values(var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword);
           function create_paraloc_info_intern(p : tabstractprocdef; side: tcallercallee; paras:tlist;
           function create_paraloc_info_intern(p : tabstractprocdef; side: tcallercallee; paras:tlist;
@@ -210,7 +210,7 @@ unit cpupara;
       end;
       end;
 
 
 
 
-    procedure tppcparamanager.create_funcret_paraloc_info(p : tabstractprocdef; side: tcallercallee);
+    procedure tppcparamanager.create_funcretloc_info(p : tabstractprocdef; side: tcallercallee);
       var
       var
         retcgsize  : tcgsize;
         retcgsize  : tcgsize;
       begin
       begin
@@ -220,21 +220,21 @@ unit cpupara;
         else
         else
           retcgsize:=def_cgsize(p.rettype.def);
           retcgsize:=def_cgsize(p.rettype.def);
 
 
-        location_reset(p.funcret_paraloc[side],LOC_INVALID,OS_NO);
-        p.funcret_paraloc[side].size:=retcgsize;
+        location_reset(p.funcretloc[side],LOC_INVALID,OS_NO);
+        p.funcretloc[side].size:=retcgsize;
         { void has no location }
         { void has no location }
         if is_void(p.rettype.def) then
         if is_void(p.rettype.def) then
           begin
           begin
-            p.funcret_paraloc[side].loc:=LOC_VOID;
+            p.funcretloc[side].loc:=LOC_VOID;
             exit;
             exit;
           end;
           end;
 
 
         { Return in FPU register? }
         { Return in FPU register? }
         if p.rettype.def.deftype=floatdef then
         if p.rettype.def.deftype=floatdef then
           begin
           begin
-            p.funcret_paraloc[side].loc:=LOC_FPUREGISTER;
-            p.funcret_paraloc[side].register:=NR_FPU_RESULT_REG;
-            p.funcret_paraloc[side].size:=retcgsize;
+            p.funcretloc[side].loc:=LOC_FPUREGISTER;
+            p.funcretloc[side].register:=NR_FPU_RESULT_REG;
+            p.funcretloc[side].size:=retcgsize;
           end
           end
         else
         else
          { Return in register? }
          { Return in register? }
@@ -244,32 +244,32 @@ unit cpupara;
             if retcgsize in [OS_64,OS_S64] then
             if retcgsize in [OS_64,OS_S64] then
              begin
              begin
                { low 32bits }
                { low 32bits }
-               p.funcret_paraloc[side].loc:=LOC_REGISTER;
+               p.funcretloc[side].loc:=LOC_REGISTER;
                if side=callerside then
                if side=callerside then
-                 p.funcret_paraloc[side].register64.reghi:=NR_FUNCTION_RESULT64_HIGH_REG
+                 p.funcretloc[side].register64.reghi:=NR_FUNCTION_RESULT64_HIGH_REG
                else
                else
-                 p.funcret_paraloc[side].register64.reghi:=NR_FUNCTION_RETURN64_HIGH_REG;
+                 p.funcretloc[side].register64.reghi:=NR_FUNCTION_RETURN64_HIGH_REG;
                { high 32bits }
                { high 32bits }
                if side=callerside then
                if side=callerside then
-                 p.funcret_paraloc[side].register64.reglo:=NR_FUNCTION_RESULT64_LOW_REG
+                 p.funcretloc[side].register64.reglo:=NR_FUNCTION_RESULT64_LOW_REG
                else
                else
-                 p.funcret_paraloc[side].register64.reglo:=NR_FUNCTION_RETURN64_LOW_REG;
+                 p.funcretloc[side].register64.reglo:=NR_FUNCTION_RETURN64_LOW_REG;
              end
              end
             else
             else
 {$endif cpu64bit}
 {$endif cpu64bit}
              begin
              begin
-               p.funcret_paraloc[side].loc:=LOC_REGISTER;
-               p.funcret_paraloc[side].size:=retcgsize;
+               p.funcretloc[side].loc:=LOC_REGISTER;
+               p.funcretloc[side].size:=retcgsize;
                if side=callerside then
                if side=callerside then
-                 p.funcret_paraloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RESULT_REG,cgsize2subreg(retcgsize))
+                 p.funcretloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RESULT_REG,cgsize2subreg(retcgsize))
                else
                else
-                 p.funcret_paraloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RETURN_REG,cgsize2subreg(retcgsize));
+                 p.funcretloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RETURN_REG,cgsize2subreg(retcgsize));
              end;
              end;
           end
           end
         else
         else
           begin
           begin
-            p.funcret_paraloc[side].loc:=LOC_REFERENCE;
-            p.funcret_paraloc[side].size:=retcgsize;
+            p.funcretloc[side].loc:=LOC_REFERENCE;
+            p.funcretloc[side].size:=retcgsize;
           end;
           end;
       end;
       end;
 
 
@@ -284,7 +284,7 @@ unit cpupara;
 
 
         result := create_paraloc_info_intern(p,side,p.paras,curintreg,curfloatreg,curmmreg,cur_stack_offset);
         result := create_paraloc_info_intern(p,side,p.paras,curintreg,curfloatreg,curmmreg,cur_stack_offset);
 
 
-        create_funcret_paraloc_info(p,side);
+        create_funcretloc_info(p,side);
       end;
       end;
 
 
 
 
@@ -587,7 +587,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.72  2004-11-21 17:17:04  florian
+  Revision 1.73  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.72  2004/11/21 17:17:04  florian
     * changed funcret location back to tlocation
     * changed funcret location back to tlocation
 
 
   Revision 1.71  2004/11/15 23:35:31  peter
   Revision 1.71  2004/11/15 23:35:31  peter
@@ -613,7 +618,7 @@ end.
     * paraloc patch
     * paraloc patch
 
 
   Revision 1.67  2004/07/19 19:15:50  florian
   Revision 1.67  2004/07/19 19:15:50  florian
-    * fixed funcret_paraloc writing in units
+    * fixed funcretloc writing in units
 
 
   Revision 1.66  2004/07/17 13:51:57  florian
   Revision 1.66  2004/07/17 13:51:57  florian
     * function result location for syscalls on MOS hopefully correctly set now
     * function result location for syscalls on MOS hopefully correctly set now

+ 9 - 4
compiler/pstatmnt.pas

@@ -519,7 +519,7 @@ implementation
                { when right is a call then load it first in a temp }
                { when right is a call then load it first in a temp }
                if p.nodetype=calln then
                if p.nodetype=calln then
                  begin
                  begin
-                   calltempp:=ctempcreatenode.create(p.resulttype,p.resulttype.def.size,tt_persistent);
+                   calltempp:=ctempcreatenode.create(p.resulttype,p.resulttype.def.size,tt_persistent,false);
                    addstatement(newstatement,calltempp);
                    addstatement(newstatement,calltempp);
                    addstatement(newstatement,cassignmentnode.create(
                    addstatement(newstatement,cassignmentnode.create(
                        ctemprefnode.create(calltempp),
                        ctemprefnode.create(calltempp),
@@ -537,10 +537,10 @@ implementation
                { we can't generate debuginfo for a withnode stored in a }
                { we can't generate debuginfo for a withnode stored in a }
                { register                                               }
                { register                                               }
                if (cs_debuginfo in aktmoduleswitches) then
                if (cs_debuginfo in aktmoduleswitches) then
-                 loadp:=ctempcreatenode.create(htype,sizeof(aint),tt_persistent)
+                 loadp:=ctempcreatenode.create(htype,sizeof(aint),tt_persistent,false)
                else
                else
 {$endif WITHNODEDEBUG}
 {$endif WITHNODEDEBUG}
-                 loadp:=ctempcreatenode.create_reg(htype,sizeof(aint),tt_persistent);
+                 loadp:=ctempcreatenode.create(htype,sizeof(aint),tt_persistent,true);
                resulttypepass(loadp);
                resulttypepass(loadp);
                if hasimplicitderef then
                if hasimplicitderef then
                 begin
                 begin
@@ -1207,7 +1207,12 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.144  2004-11-08 22:09:59  peter
+  Revision 1.145  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.144  2004/11/08 22:09:59  peter
     * tvarsym splitted
     * tvarsym splitted
 
 
   Revision 1.143  2004/10/15 10:35:23  mazen
   Revision 1.143  2004/10/15 10:35:23  mazen

+ 26 - 21
compiler/sparc/cpupara.pas

@@ -44,7 +44,7 @@ interface
         function  create_paraloc_info(p : TAbstractProcDef; side: tcallercallee):longint;override;
         function  create_paraloc_info(p : TAbstractProcDef; side: tcallercallee):longint;override;
         function  create_varargs_paraloc_info(p : TAbstractProcDef; varargspara:tvarargsparalist):longint;override;
         function  create_varargs_paraloc_info(p : TAbstractProcDef; varargspara:tvarargsparalist):longint;override;
       private
       private
-        procedure create_funcret_paraloc_info(p : tabstractprocdef; side: tcallercallee);
+        procedure create_funcretloc_info(p : tabstractprocdef; side: tcallercallee);
         procedure create_paraloc_info_intern(p : tabstractprocdef; side: tcallercallee; paras: tlist;
         procedure create_paraloc_info_intern(p : tabstractprocdef; side: tcallercallee; paras: tlist;
                                              var intparareg,parasize:longint);
                                              var intparareg,parasize:longint);
       end;
       end;
@@ -141,7 +141,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tsparcparamanager.create_funcret_paraloc_info(p : tabstractprocdef; side: tcallercallee);
+    procedure tsparcparamanager.create_funcretloc_info(p : tabstractprocdef; side: tcallercallee);
       var
       var
         retcgsize  : tcgsize;
         retcgsize  : tcgsize;
       begin
       begin
@@ -151,23 +151,23 @@ implementation
         else
         else
           retcgsize:=def_cgsize(p.rettype.def);
           retcgsize:=def_cgsize(p.rettype.def);
 
 
-        location_reset(p.funcret_paraloc[side],LOC_INVALID,OS_NO);
-        p.funcret_paraloc[side].size:=retcgsize;
+        location_reset(p.funcretloc[side],LOC_INVALID,OS_NO);
+        p.funcretloc[side].size:=retcgsize;
         { void has no location }
         { void has no location }
         if is_void(p.rettype.def) then
         if is_void(p.rettype.def) then
           begin
           begin
-            p.funcret_paraloc[side].loc:=LOC_VOID;
+            p.funcretloc[side].loc:=LOC_VOID;
             exit;
             exit;
           end;
           end;
 
 
         { Return in FPU register? }
         { Return in FPU register? }
         if p.rettype.def.deftype=floatdef then
         if p.rettype.def.deftype=floatdef then
           begin
           begin
-            paraloc^.loc:=LOC_FPUREGISTER;
-            p.funcret_paraloc[side].register:=NR_FPU_RESULT_REG;
+            p.funcretloc[side].loc:=LOC_FPUREGISTER;
+            p.funcretloc[side].register:=NR_FPU_RESULT_REG;
             if retcgsize=OS_F64 then
             if retcgsize=OS_F64 then
-              setsubreg(p.funcret_paraloc[side].register,R_SUBFD);
-            p.funcret_paraloc[side].size:=retcgsize;
+              setsubreg(p.funcretloc[side].register,R_SUBFD);
+            p.funcretloc[side].size:=retcgsize;
           end
           end
         else
         else
          { Return in register? }
          { Return in register? }
@@ -178,30 +178,30 @@ implementation
              begin
              begin
                { high }
                { high }
                if (side=callerside)  or (p.proccalloption=pocall_inline)then
                if (side=callerside)  or (p.proccalloption=pocall_inline)then
-                 p.funcret_paraloc[side].register64.reghi:=NR_FUNCTION_RESULT64_HIGH_REG
+                 p.funcretloc[side].register64.reghi:=NR_FUNCTION_RESULT64_HIGH_REG
                else
                else
-                 p.funcret_paraloc[side].register64.reghi:=NR_FUNCTION_RETURN64_HIGH_REG;
+                 p.funcretloc[side].register64.reghi:=NR_FUNCTION_RETURN64_HIGH_REG;
                { low }
                { low }
                if (side=callerside) or (p.proccalloption=pocall_inline) then
                if (side=callerside) or (p.proccalloption=pocall_inline) then
-                 p.funcret_paraloc[side].register64.reglo:=NR_FUNCTION_RESULT64_LOW_REG
+                 p.funcretloc[side].register64.reglo:=NR_FUNCTION_RESULT64_LOW_REG
                else
                else
-                 p.funcret_paraloc[side].register64.reglo:=NR_FUNCTION_RETURN64_LOW_REG;
+                 p.funcretloc[side].register64.reglo:=NR_FUNCTION_RETURN64_LOW_REG;
              end
              end
             else
             else
 {$endif cpu64bit}
 {$endif cpu64bit}
              begin
              begin
-               p.funcret_paraloc[side].loc:=LOC_REGISTER;
-               p.funcret_paraloc[side].size:=retcgsize;
+               p.funcretloc[side].loc:=LOC_REGISTER;
+               p.funcretloc[side].size:=retcgsize;
                if (side=callerside)  or (p.proccalloption=pocall_inline)then
                if (side=callerside)  or (p.proccalloption=pocall_inline)then
-                 p.funcret_paraloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RESULT_REG,cgsize2subreg(retcgsize))
+                 p.funcretloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RESULT_REG,cgsize2subreg(retcgsize))
                else
                else
-                 p.funcret_paraloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RETURN_REG,cgsize2subreg(retcgsize));
+                 p.funcretloc[side].register:=newreg(R_INTREGISTER,RS_FUNCTION_RETURN_REG,cgsize2subreg(retcgsize));
              end;
              end;
           end
           end
         else
         else
           begin
           begin
-            p.funcret_paraloc[side].loc:=LOC_REFERENCE;
-            p.funcret_paraloc[side].size:=retcgsize;
+            p.funcretloc[side].loc:=LOC_REFERENCE;
+            p.funcretloc[side].size:=retcgsize;
           end;
           end;
       end;
       end;
 
 
@@ -305,7 +305,7 @@ implementation
         parasize:=0;
         parasize:=0;
         create_paraloc_info_intern(p,side,p.paras,intparareg,parasize);
         create_paraloc_info_intern(p,side,p.paras,intparareg,parasize);
         { Create Function result paraloc }
         { Create Function result paraloc }
-        create_funcret_paraloc_info(p,side);
+        create_funcretloc_info(p,side);
         { We need to return the size allocated on the stack }
         { We need to return the size allocated on the stack }
         result:=parasize;
         result:=parasize;
       end;
       end;
@@ -316,7 +316,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.48  2004-11-21 17:17:04  florian
+  Revision 1.49  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.48  2004/11/21 17:17:04  florian
     * changed funcret location back to tlocation
     * changed funcret location back to tlocation
 
 
   Revision 1.47  2004/11/15 23:35:31  peter
   Revision 1.47  2004/11/15 23:35:31  peter

+ 17 - 12
compiler/symdef.pas

@@ -443,7 +443,7 @@ interface
 {$ifdef i386}
 {$ifdef i386}
           fpu_used        : byte;    { how many stack fpu must be empty }
           fpu_used        : byte;    { how many stack fpu must be empty }
 {$endif i386}
 {$endif i386}
-          funcret_paraloc : array[tcallercallee] of TLocation;
+          funcretloc : array[tcallercallee] of TLocation;
           has_paraloc_info : boolean; { paraloc info is available }
           has_paraloc_info : boolean; { paraloc info is available }
           constructor create(level:byte);
           constructor create(level:byte);
           constructor ppuload(ppufile:tcompilerppufile);
           constructor ppuload(ppufile:tcompilerppufile);
@@ -3271,8 +3271,8 @@ implementation
          requiredargarea:=0;
          requiredargarea:=0;
          has_paraloc_info:=false;
          has_paraloc_info:=false;
 
 
-         location_reset(funcret_paraloc[callerside],LOC_INVALID,OS_NO);
-         location_reset(funcret_paraloc[calleeside],LOC_INVALID,OS_NO);
+         location_reset(funcretloc[callerside],LOC_INVALID,OS_NO);
+         location_reset(funcretloc[calleeside],LOC_INVALID,OS_NO);
       end;
       end;
 
 
 
 
@@ -3422,14 +3422,14 @@ implementation
          proccalloption:=tproccalloption(ppufile.getbyte);
          proccalloption:=tproccalloption(ppufile.getbyte);
          ppufile.getsmallset(procoptions);
          ppufile.getsmallset(procoptions);
 
 
-         location_reset(funcret_paraloc[callerside],LOC_INVALID,OS_NO);
-         location_reset(funcret_paraloc[calleeside],LOC_INVALID,OS_NO);
+         location_reset(funcretloc[callerside],LOC_INVALID,OS_NO);
+         location_reset(funcretloc[calleeside],LOC_INVALID,OS_NO);
          if po_explicitparaloc in procoptions then
          if po_explicitparaloc in procoptions then
            begin
            begin
              b:=ppufile.getbyte;
              b:=ppufile.getbyte;
-             if b<>sizeof(funcret_paraloc[callerside]) then
+             if b<>sizeof(funcretloc[callerside]) then
                internalerror(200411154);
                internalerror(200411154);
-             ppufile.getdata(funcret_paraloc[callerside],sizeof(funcret_paraloc[callerside]));
+             ppufile.getdata(funcretloc[callerside],sizeof(funcretloc[callerside]));
            end;
            end;
 
 
          savesize:=sizeof(aint);
          savesize:=sizeof(aint);
@@ -3462,9 +3462,9 @@ implementation
 
 
          if (po_explicitparaloc in procoptions) then
          if (po_explicitparaloc in procoptions) then
            begin
            begin
-             { Make a 'valid' funcret_paraloc for procedures }
-             ppufile.putbyte(sizeof(funcret_paraloc[callerside]));
-             ppufile.putdata(funcret_paraloc[callerside],sizeof(funcret_paraloc[callerside]));
+             { Make a 'valid' funcretloc for procedures }
+             ppufile.putbyte(sizeof(funcretloc[callerside]));
+             ppufile.putdata(funcretloc[callerside],sizeof(funcretloc[callerside]));
            end;
            end;
       end;
       end;
 
 
@@ -6129,7 +6129,12 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.276  2004-11-21 17:17:04  florian
+  Revision 1.277  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.276  2004/11/21 17:17:04  florian
     * changed funcret location back to tlocation
     * changed funcret location back to tlocation
 
 
   Revision 1.275  2004/11/21 16:33:19  peter
   Revision 1.275  2004/11/21 16:33:19  peter
@@ -6233,7 +6238,7 @@ end.
     * fixed web bug 3226: type p = type pointer;
     * fixed web bug 3226: type p = type pointer;
 
 
   Revision 1.248  2004/07/19 19:15:50  florian
   Revision 1.248  2004/07/19 19:15:50  florian
-    * fixed funcret_paraloc writing in units
+    * fixed funcretloc writing in units
 
 
   Revision 1.247  2004/07/14 21:37:41  olle
   Revision 1.247  2004/07/14 21:37:41  olle
     - removed unused types
     - removed unused types

+ 13 - 8
compiler/x86_64/cpupara.pas

@@ -36,7 +36,7 @@ unit cpupara;
     type
     type
        tx86_64paramanager = class(tparamanager)
        tx86_64paramanager = class(tparamanager)
        private
        private
-          procedure create_funcret_paraloc_info(p : tabstractprocdef; side: tcallercallee);
+          procedure create_funcretloc_info(p : tabstractprocdef; side: tcallercallee);
           procedure create_paraloc_info_intern(p : tabstractprocdef; side: tcallercallee;firstpara:tparaitem;
           procedure create_paraloc_info_intern(p : tabstractprocdef; side: tcallercallee;firstpara:tparaitem;
                                                var intparareg,mmparareg,parasize:longint);
                                                var intparareg,mmparareg,parasize:longint);
        public
        public
@@ -185,7 +185,7 @@ unit cpupara;
       end;
       end;
 
 
 
 
-    procedure tx86_64paramanager.create_funcret_paraloc_info(p : tabstractprocdef; side: tcallercallee);
+    procedure tx86_64paramanager.create_funcretloc_info(p : tabstractprocdef; side: tcallercallee);
       var
       var
         paraloc : pcgparalocation;
         paraloc : pcgparalocation;
         retcgsize : tcgsize;
         retcgsize : tcgsize;
@@ -195,13 +195,13 @@ unit cpupara;
           retcgsize:=OS_ADDR
           retcgsize:=OS_ADDR
         else
         else
           retcgsize:=def_cgsize(p.rettype.def);
           retcgsize:=def_cgsize(p.rettype.def);
-        p.funcret_paraloc[side].reset;
-        p.funcret_paraloc[side].Alignment:=std_param_align;
-        p.funcret_paraloc[side].size:=retcgsize;
+        p.funcretloc[side].reset;
+        p.funcretloc[side].Alignment:=std_param_align;
+        p.funcretloc[side].size:=retcgsize;
         { void has no location }
         { void has no location }
         if is_void(p.rettype.def) then
         if is_void(p.rettype.def) then
           exit;
           exit;
-        paraloc:=p.funcret_paraloc[side].add_location;
+        paraloc:=p.funcretloc[side].add_location;
         { Return in FPU register? }
         { Return in FPU register? }
         if p.rettype.def.deftype=floatdef then
         if p.rettype.def.deftype=floatdef then
           begin
           begin
@@ -418,7 +418,7 @@ unit cpupara;
         parasize:=0;
         parasize:=0;
         create_paraloc_info_intern(p,side,tparaitem(p.para.first),intparareg,mmparareg,parasize);
         create_paraloc_info_intern(p,side,tparaitem(p.para.first),intparareg,mmparareg,parasize);
         { Create Function result paraloc }
         { Create Function result paraloc }
-        create_funcret_paraloc_info(p,side);
+        create_funcretloc_info(p,side);
         { We need to return the size allocated on the stack }
         { We need to return the size allocated on the stack }
         result:=parasize;
         result:=parasize;
       end;
       end;
@@ -429,7 +429,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.11  2004-10-05 20:55:49  peter
+  Revision 1.12  2004-11-21 17:54:59  peter
+    * ttempcreatenode.create_reg merged into .create with parameter
+      whether a register is allowed
+    * funcret_paraloc renamed to funcretloc
+
+  Revision 1.11  2004/10/05 20:55:49  peter
     * fixed location size for s64comp
     * fixed location size for s64comp
 
 
   Revision 1.10  2004/09/21 17:25:13  peter
   Revision 1.10  2004/09/21 17:25:13  peter