Browse Source

* fixed wrong generation of teardown of stackframe on i386-darwin
in case no stackframe was generated (in case no pi_do_call in
current_procinfo.flags)

git-svn-id: trunk@2876 -

Jonas Maebe 19 years ago
parent
commit
7b5ee7342a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/i386/cgcpu.pas

+ 2 - 1
compiler/i386/cgcpu.pas

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