cdecl calling convention (C, C++)
•Parameters are passed from right to left
•Caller is responsible for adjusting the stack after calling the function (callee)
•Allows to call functions with variable number of parameters (printf)
•
•printf(“result = %d”, value);
•
•EBP-> Previous EBP
• Return address
• “” string
• value
•
•printf(“left: %d right: %d top: %d bottom: %d”, left, right, top, bottom);
•
•EBP-> Previous EBP
• Return address
• “” string
• left
• right
• top
• bottom