Function call and stacks for Calling Conventions
When a function is called arguments are passed to the called function by different means, like stacks ,registers. Similarly return is either done by stack or register, According to function calling conventions the compiler design the assembly code from c/cpp codes to pass arguments to called function. It also specify the stack handling of the portion used by the function. In x86 stack normally grow downward. EBP keeps track of the base of the frame(frame pointer),and ESP keeps track of the top of the stack.EAX have the return value. In PPC stack pointer is r1,Base pointer is r0,r3 is the return register. As I blogged before on PPC register classification . (from wikipedia) The C function Calling convention define following things Order in which arguments are pushed on the stack. Who is responsible for stack clean-up process either callee or caller function after call complete. Name decorating for individual function before linking. Available call c...