Developer Guide and Reference

Contents

C/C++ Calling Conventions

There are a number of calling conventions that set the rules on how arguments are passed to a function and how the values are returned from the function.

Calling Conventions on Windows*

The following table summarizes the supported calling conventions on Windows*:
Calling Convention
Compiler Option
Description
__cdecl
/Gd
This is the default calling convention for C/C++ programs. It can be specified on a function with variable arguments.
__stdcall
/Gz
Standard calling convention used for Win32 API functions.
__fastcall
/Gr
Fast calling convention that specifies that arguments are passed in registers rather than on the stack.
__regcall
/Qregcall
specifies that
__regcall
is the default calling convention for functions in the compilation, unless another calling convention is specified on a declaration.
Intel® C++ Compiler calling convention that specifies that as many arguments as possible are passed in registers; likewise,
__regcall
uses registers whenever possible to return values. This calling convention is ignored if specified on a function with variable arguments.
For more information about the Intel-compatible vector functions ABI, see the article
Vector (SIMD) Function ABI
at https://software.intel.com/en-us/articles/vector-simd-function-abi .
For more information about the GCC vector functions ABI, see the item Libmvec - vector math library document in the GLIBC wiki at sourceware.org.