History

called function should pop the arguments when using fastcall

Zhang Boyang committed 9 years ago

Commit b8fe8fc1 parent ac41e011 file · +3 −3Browse files

Unified · Split

i386-gen.c+3−3
@@ -504,7 +504,7 @@ ST_FUNC void gfunc_call(int nb_args) · 503 unmodified lines
504#endif504#endif
505 gcall_or_jmp(0);505 gcall_or_jmp(0);
506 506
507 if (args_size && func_call != FUNC_STDCALL)507 if (args_size && func_call != FUNC_STDCALL && func_call != FUNC_FASTCALLW)
508 gadd_sp(args_size);508 gadd_sp(args_size);
509 vtop--;509 vtop--;
510}510}
@@ -586,8 +586,8 @@ ST_FUNC void gfunc_prolog(CType *func_type) · 75 unmodified lines
586 param_index++;586 param_index++;
587 }587 }
588 func_ret_sub = 0;588 func_ret_sub = 0;
589 /* pascal type call ? */589 /* pascal type call or fastcall ? */
590 if (func_call == FUNC_STDCALL)590 if (func_call == FUNC_STDCALL || func_call == FUNC_FASTCALLW)
591 func_ret_sub = addr - 8;591 func_ret_sub = addr - 8;
592#ifndef TCC_TARGET_PE592#ifndef TCC_TARGET_PE
593 else if (func_vc)593 else if (func_vc)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t