浏览代码

* 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
           begin
             { 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));
 
             if not (po_nostackframe in procdef.procoptions) then