called function should pop the arguments when using fastcall

master
Zhang Boyang 2017-08-21 19:38:11 +08:00
parent ac41e015f1
commit b8fe8fc210
1 changed files with 3 additions and 3 deletions

View File

@ -504,7 +504,7 @@ ST_FUNC void gfunc_call(int nb_args)
#endif
gcall_or_jmp(0);
if (args_size && func_call != FUNC_STDCALL)
if (args_size && func_call != FUNC_STDCALL && func_call != FUNC_FASTCALLW)
gadd_sp(args_size);
vtop--;
}
@ -586,8 +586,8 @@ ST_FUNC void gfunc_prolog(CType *func_type)
param_index++;
}
func_ret_sub = 0;
/* pascal type call ? */
if (func_call == FUNC_STDCALL)
/* pascal type call or fastcall ? */
if (func_call == FUNC_STDCALL || func_call == FUNC_FASTCALLW)
func_ret_sub = addr - 8;
#ifndef TCC_TARGET_PE
else if (func_vc)