Bläddra i källkod

* fixed previous commit

git-svn-id: trunk@2877 -
Jonas Maebe 19 år sedan
förälder
incheckning
09a3bbfc07
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      compiler/i386/cgcpu.pas

+ 2 - 1
compiler/i386/cgcpu.pas

@@ -261,7 +261,8 @@ unit cgcpu;
               begin
               begin
                 stacksize:=current_procinfo.calc_stackframe_size;
                 stacksize:=current_procinfo.calc_stackframe_size;
                 if (target_info.system = system_i386_darwin) and
                 if (target_info.system = system_i386_darwin) and
-                   (pi_do_call in current_procinfo.flags) then
+                   ((stacksize <> 0) or
+                    (pi_do_call in current_procinfo.flags)) then
                   stacksize := align(stacksize+sizeof(aint),16) - sizeof(aint);
                   stacksize := align(stacksize+sizeof(aint),16) - sizeof(aint);
                 if (stacksize<>0) then
                 if (stacksize<>0) then
                   cg.a_op_const_reg(list,OP_ADD,OS_ADDR,stacksize,current_procinfo.framepointer);
                   cg.a_op_const_reg(list,OP_ADD,OS_ADDR,stacksize,current_procinfo.framepointer);