* 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 -
This commit is contained in:
Jonas Maebe 2006-03-11 22:38:28 +00:00
parent 638b2ecb2b
commit 7b5ee7342a

View File

@ -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);