From 7b5ee7342aba962f6bfc9e9fd339ec24eaa9166f Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 11 Mar 2006 22:38:28 +0000 Subject: [PATCH] * 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 - --- compiler/i386/cgcpu.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/i386/cgcpu.pas b/compiler/i386/cgcpu.pas index fe9b11b33d..741cc0144d 100644 --- a/compiler/i386/cgcpu.pas +++ b/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);