瀏覽代碼

Do not add first_param_offset for po_nostackframe and po_assembler in calc_stack_size

git-svn-id: trunk@22716 -
pierre 12 年之前
父節點
當前提交
124499474c
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      compiler/sparc/cpupi.pas

+ 5 - 1
compiler/sparc/cpupi.pas

@@ -67,7 +67,11 @@ implementation
           Alignment must be the max available, as doubles require
           8 byte alignment
         }
-        result:=Align(tg.direction*tg.lasttemp+maxpushedparasize+target_info.first_parm_offset,current_settings.alignment.localalignmax);
+        if (po_assembler in procdef.procoptions) or
+           (po_nostackframe in procdef.procoptions) then
+          result:=Align(tg.direction*tg.lasttemp+maxpushedparasize,current_settings.alignment.localalignmax)
+        else
+          result:=Align(tg.direction*tg.lasttemp+maxpushedparasize+target_info.first_parm_offset,current_settings.alignment.localalignmax);
       end;