cdecl
Cdecl is a calling convention used by C and C++ on x86 processors that specifies how functions receive arguments, return values, and how the call stack is managed. Under cdecl, function arguments are pushed onto the stack from right to left, and the caller is responsible for cleaning the stack after the call. The callee should not adjust the stack pointer to remove arguments.
Return values: for most integer and pointer types, the result is returned in the EAX register. Floating-point
Register usage and prologue/epilogue: the callee must preserve certain registers (commonly EBX, ESI, EDI, and EBP)
Variadic support: cdecl is well suited for functions with a variable number of arguments, such as printf,
Platform notes: cdecl is mainly associated with 32-bit x86 code and is widely supported by compilers like
In summary, cdecl defines a widely used, flexible model for x86 function calls, emphasizing right-to-left argument