Usually, your program passes parameters to functions on the stack. The /Gr option causes your program to pass parameters in registers instead. Typically, this calling convention decreases execution time, but it gives no advantage if you compile with the Fast Compile (/f) option. Therefore, use the /Gr option only for final compilations that require the full optimizing capabilities of Microsoft C/C++.
Passing parameters in registers is not appropriate for all functions. The /Gr option enables register passing for all eligible functions, and the __fastcall keyword enables it on a function-by-function basis. You cannot use the __fastcall keyword with the __pascal, __fortran, or __cdecl keywords.
Because the 80x86 processor has a limited number of registers, only the first three parameters are passed in registers; the remaining parameters are passed using the FORTRAN/Pascal calling convention (see the /Gc option).
Note that the compiler allocates different registers for variables declared as register and for passing arguments using the register calling convention. Passing arguments in registers does not conflict with any register variables that you may have declared.
Important:
Be careful when using the register calling convention for any function written in inline assembly language. Your use of registers in assembly language could conflict with the compiler's use of registers for storing parameters.