Pārlūkot izejas kodu

+ introduce cstylearrayofconst because pocall_mwcall was forgotten at several places

git-svn-id: trunk@22012 -
florian 13 gadi atpakaļ
vecāks
revīzija
eb1efdff8a

+ 2 - 2
compiler/arm/cpupara.pas

@@ -345,7 +345,7 @@ unit cpupara;
 
             { currently only support C-style array of const,
               there should be no location assigned to the vararg array itself }
-            if (p.proccalloption in [pocall_cdecl,pocall_cppdecl]) and
+            if (p.proccalloption in cstylearrayofconst) and
                is_array_of_const(paradef) then
               begin
                 paraloc:=hp.paraloc[side].add_location;
@@ -701,7 +701,7 @@ unit cpupara;
         init_values(curintreg,curfloatreg,curmmreg,cur_stack_offset,sparesinglereg);
 
         result:=create_paraloc_info_intern(p,callerside,p.paras,curintreg,curfloatreg,curmmreg,cur_stack_offset,sparesinglereg,true);
-        if (p.proccalloption in [pocall_cdecl,pocall_cppdecl]) then
+        if (p.proccalloption in cstylearrayofconst) then
           { just continue loading the parameters in the registers }
           result:=create_paraloc_info_intern(p,callerside,varargspara,curintreg,curfloatreg,curmmreg,cur_stack_offset,sparesinglereg,true)
         else

+ 2 - 2
compiler/avr/cpupara.pas

@@ -260,7 +260,7 @@ unit cpupara;
 
             { currently only support C-style array of const,
               there should be no location assigned to the vararg array itself }
-            if (p.proccalloption in [pocall_cdecl,pocall_cppdecl]) and
+            if (p.proccalloption in cstylearrayofconst) and
                is_array_of_const(paradef) then
               begin
                 paraloc:=hp.paraloc[side].add_location;
@@ -478,7 +478,7 @@ unit cpupara;
         init_values(curintreg,curfloatreg,curmmreg,cur_stack_offset);
 
         result:=create_paraloc_info_intern(p,callerside,p.paras,curintreg,curfloatreg,curmmreg,cur_stack_offset);
-        if (p.proccalloption in [pocall_cdecl,pocall_cppdecl]) then
+        if (p.proccalloption in cstylearrayofconst) then
           { just continue loading the parameters in the registers }
           result:=create_paraloc_info_intern(p,callerside,varargspara,curintreg,curfloatreg,curmmreg,cur_stack_offset)
         else

+ 2 - 0
compiler/globtype.pas

@@ -462,6 +462,8 @@ interface
        pocall_default = pocall_stdcall;
 {$endif}
 
+       cstylearrayofconst = [pocall_cdecl,pocall_cppdecl,pocall_mwpascal];
+
        modeswitchstr : array[tmodeswitch] of string[18] = ('','',
          '','','','','','',
          {$ifdef fpc_mode}'',{$endif}

+ 2 - 2
compiler/m68k/cpupara.pas

@@ -285,7 +285,7 @@ unit cpupara;
             hp.paraloc[side].reset;
 
             { currently only support C-style array of const }
-            if (p.proccalloption in [pocall_cdecl,pocall_cppdecl]) and
+            if (p.proccalloption in cstylearrayofconst) and
                is_array_of_const(paradef) then
               begin
 {$ifdef DEBUG_CHARLIE}
@@ -549,7 +549,7 @@ unit cpupara;
         init_values(curintreg,curfloatreg,cur_stack_offset);
 
         result:=create_paraloc_info_intern(p,callerside,p.paras,curintreg,curfloatreg,cur_stack_offset);
-        if (p.proccalloption in [pocall_cdecl,pocall_cppdecl]) then
+        if (p.proccalloption in cstylearrayofconst) then
           { just continue loading the parameters in the registers }
           result:=create_paraloc_info_intern(p,callerside,varargspara,curintreg,curfloatreg,cur_stack_offset)
         else

+ 1 - 1
compiler/mips/cpupara.pas

@@ -288,7 +288,7 @@ implementation
             paradef := hp.vardef;
 
             { currently only support C-style array of const }
-             if (p.proccalloption in [pocall_cdecl,pocall_cppdecl]) and
+             if (p.proccalloption in cstylearrayofconst) and
                is_array_of_const(paradef) then
               begin
                 paraloc:=hp.paraloc[side].add_location;

+ 1 - 1
compiler/pdecsub.pas

@@ -2175,7 +2175,7 @@ const
       handler  : @pd_interrupt;
       pocall   : pocall_oldfpccall;
       pooption : [po_interrupt];
-      mutexclpocall : [pocall_internproc,pocall_cdecl,pocall_cppdecl,pocall_stdcall,
+      mutexclpocall : [pocall_internproc,pocall_cdecl,pocall_cppdecl,pocall_stdcall,pocall_mwpascal,
                        pocall_pascal,pocall_far16,pocall_oldfpccall];
       mutexclpotype : [potype_constructor,potype_destructor,potype_operator,potype_class_constructor,potype_class_destructor];
       mutexclpo     : [po_external,po_inline]

+ 2 - 2
compiler/powerpc/cpupara.pas

@@ -356,7 +356,7 @@ unit cpupara;
                 end;
               hp.paraloc[side].reset;
               { currently only support C-style array of const }
-              if (p.proccalloption in [pocall_cdecl,pocall_cppdecl,pocall_mwpascal]) and
+              if (p.proccalloption in cstylearrayofconst) and
                  is_array_of_const(paradef) then
                 begin
                   paraloc:=hp.paraloc[side].add_location;
@@ -573,7 +573,7 @@ unit cpupara;
         firstfloatreg:=curfloatreg;
 
         result:=create_paraloc_info_intern(p,callerside,p.paras,curintreg,curfloatreg,curmmreg,cur_stack_offset, false);
-        if (p.proccalloption in [pocall_cdecl,pocall_cppdecl,pocall_mwpascal]) then
+        if (p.proccalloption in cstylearrayofconst) then
           { just continue loading the parameters in the registers }
           begin
             result:=create_paraloc_info_intern(p,callerside,varargspara,curintreg,curfloatreg,curmmreg,cur_stack_offset,true);

+ 1 - 1
compiler/sparc/cpupara.pas

@@ -214,7 +214,7 @@ implementation
             paradef:=hp.vardef;
             { currently only support C-style array of const,
               there should be no location assigned to the vararg array itself }
-            if (p.proccalloption in [pocall_cdecl,pocall_cppdecl]) and
+            if (p.proccalloption in cstylearrayofconst) and
                is_array_of_const(paradef) then
               begin
                 paraloc:=hp.paraloc[side].add_location;