Table of Contents        Previous topic       Next topic       

C/C++ COMPILER->Function Calling Conventions->Fast Call Calling Convention

When the /Gr option is used, __fastall is the default calling convention and all functions must be prototyped.

Functions declared with the __fastcall qualifier will also use the __fastcall calling convention, overriding any alternative default option.

Functions declared with an ellipsis (...) parameter will be called with the __cdecl calling convention.

If an appropriate register is available, an argument will be passed in a register. Arguments are passed in registers R0, R1, R2 and R3. Candidate arguments for passing in registers are selected from left to right. The register keyword will be ignored.

Other arguments are pushed onto the stack starting from the rightmost argument and finishing with the leftmost argument.

The arguments are popped from the stack by the called function before it returns.  (Callee pops stack.)