Calling Conventions

(From Wikipedia)

Architecture Calling convention name Operating system, Compiler Parameters in registers Parameter order on stack Stack cleanup by Notes
16bit cdecl RTL (C) caller
pascal LTR (Pascal) function
fastcall Microsoft (non-member) ax, dx, bx LTR (Pascal) function return pointer in bx
fastcall Microsoft (member function) ax, dx LTR (Pascal) function "this" on stack low address. return pointer in ax
fastcall Borland compiler ax, dx, bx LTR (Pascal) function "this" on stack low address. return ptr on stack high address.
Watcom compiler ax, dx, bx, cx RTL (C) function return pointer in si
32bit cdecl RTL (C) caller
GCC RTL (C) hybrid Stack possibly on 16 bytes aligned.
fastcall Microsoft ecx, edx RTL (C) function return pointer on stack if not member function
fastcall GCC ecx, edx RTL (C) function
fastcall Borland compiler eax, edx, ecx LTR (Pascal) function
thiscall Microsoft ecx RTL (C) function default for member functions
Watcom compiler eax, edx, ebx, ecx RTL (C) function return pointer in esi
64bit Microsoft x64 calling convention Windows (Microsoft compiler, Intel compiler) rcx/xmm0, rdx/xmm1, r8/xmm2, r9/xmm3 RTL (C) caller Stack aligned on 16 bytes. 32 bytes shadow space on stack. The specified 8 registers can only be used for parameter number 1,2,3 and 4.
System V AMD64 ABI convention Linux, BSD, Mac (GCC, Intel compiler) rdi, rsi, rdx, rcx, r8, r9, xmm0-7 RTL (C) caller Stack aligned on 16 bytes. Red zone below stack.