telecom • networking • design

an EventHelix.com blog


Leave a comment

C Function Call to Assembly Translation – Frame Pointer Operations

Even though most programming is now carried out in high level languages, a good understanding of the generated assembly code really helps in debugging, performance analysis and performance tuning.

In this article, we will discuss the assembly code generated for function calling, parameter passing and local variable management. Frame pointer operations in a function call are described in detail.

C function call mapped to assembly - learn about frame pointer operations

We follow the lifecycle of a function call:

  1. Pushing parameters
  2. Invoking function
  3. Setting up the frame pointer
  4. Dismantling the frame and restoring the callers frame at function exit
  5. The caller popping the parameters.

C to Assembly : function calls and frame pointer operations