Преглед изворни кода

* MIPS: allocate 16-byte outgoing parameter area also for procedures declared as 'assembler' without 'nostackframe'. This is a half-measure because there is no way to determine correct size to allocate for such procedures (probably we must add some directive to specify it). The same generally applies to all targets with fixed stack, not just MIPS.

git-svn-id: trunk@23663 -
sergei пре 12 година
родитељ
комит
5812cf3b46
1 измењених фајлова са 5 додато и 2 уклоњено
  1. 5 2
      compiler/mips/cpupi.pas

+ 5 - 2
compiler/mips/cpupi.pas

@@ -106,8 +106,11 @@ implementation
         else
         else
           begin
           begin
             { Fixes the case when there are calls done by low-level means
             { Fixes the case when there are calls done by low-level means
-              (cg.a_call_name) but no child callnode }
-            if (pi_do_call in flags) then
+              (cg.a_call_name) but no child callnode. !!For assembler procedure
+              there is no clean way to determine what it calls, unless it is
+              also declared as nostackframe and everything is managed manually. }
+            if (pi_do_call in flags) or
+               ((pi_is_assembler in flags) and not (po_nostackframe in procdef.procoptions)) then
               allocate_push_parasize(mips_nb_used_registers*sizeof(aint));
               allocate_push_parasize(mips_nb_used_registers*sizeof(aint));
 
 
             if not (po_nostackframe in procdef.procoptions) then
             if not (po_nostackframe in procdef.procoptions) then