do not move rsp if stacksize is zero
This commit is contained in:
parent
fd1873549f
commit
f168dce162
3
gen.c
3
gen.c
@ -406,7 +406,8 @@ void gen_prolog(Gen*gen,const PNode*pn,FILE*file,size_t stacksize)
|
||||
if(gen->buildarch==M_X86_64)
|
||||
fprintf(file,"\t%s %%%s\n",push_wordsize[which],registers_abi_wordsize[which][2]);
|
||||
fprintf(file,"\t%s %%%s,%%%s\n",mov_wordsize[which],gen_sp[which],gen_bp[which]);
|
||||
fprintf(file,"\t%s $%lu,%%%s\n",sub_wordsize[which],stacksize,gen_sp[which]);
|
||||
if(stacksize>0)
|
||||
fprintf(file,"\t%s $%lu,%%%s\n",sub_wordsize[which],stacksize,gen_sp[which]);
|
||||
|
||||
// Move argument variables to stack
|
||||
//const char*reg_order_sysv[]={"edi","esi","edx","ecx","r8d","r9d"};
|
||||
|
Loading…
Reference in New Issue
Block a user