Table of Contents Previous topic Next topic
C/C++ COMPILER->Function Calling Conventions->Fast Call Calling Convention
The __fastcall calling convention is only available when the Advanced Features of the compiler are enabled.
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 traditional calling convention.
If an appropriate register is available, an argument will be passed in a register. Integer arguments are passed in registers D1 and D0. Pointer arguments are passed in registers A1 and A0. If the chip has a floating point unit, floating point arguments are passed in floating point registers FP1 and FP0. 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.)